Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport Cocoapods #1
Conversation
|
Hi @aceontech, thank you for your pull request. I was thinking a little bit about CocoaPods and I am not strongly feeling it’s necessary to add podspec file to the repository. Because CocoaPods users can use this library without having a podspec file in this repository. For example, add next simple podspac file as like the one in your patch in the project then add
Also, since CocoaPods is managing its package version by the podspec file content, not git tags. Therefore adding podspec file to the repository causes a certain type of legacy and an unnecessary restriction to the project repository that need to sync git tag and podspec file content change. Now, Swift Package Manager is integrated in Xcode and I think it is getting a de-facto package manager for Apple platform. CocoaPods is one of 3rd party package management tools, and there are a few others commonly used for Apple platform such as Carthage. If the project supports one of these 3rd party one, it will ends up with adding more and more management files to the project and these will be legacy at some point near future when Swift Package adaptation increased, so I am worrying of it as well. I am not fully making decisions about CocoaPod support (or Carthage,) as long as it is commonly widely used in the community, and wondering how it is difficult to use Swift Package Manager alongside CocoaPods or others, or migrate to it. Thoughts? |
|
|
||
| spec.homepage = "https://github.com/niw/KeyboardGuide" | ||
| spec.license = "MIT" | ||
| spec.author = { "Yoshimasa Niwa" => "[email protected]" } |
niw
Oct 24, 2020
Owner
It can omit email, simply spec.author = "Yoshimasa Niwa" should be fine.
It can omit email, simply spec.author = "Yoshimasa Niwa" should be fine.
| spec.description = <<-DESC | ||
| A modern, real iOS keyboard system notifications handler framework that Just Works. | ||
| Based on years experience of iOS application development and various tests on each iOS version and device, it supports both Swift and Objective-C and works mostly reasonably on the latest 3 versions of iOS, which is iOS 11, 12 and iOS 13 now, and covers almost all iOS users. | ||
| DESC |
niw
Oct 24, 2020
Owner
I think this description is not required, as you mentioned in the comment it's shorten version of content that users can see on GitHub repository.
I think this description is not required, as you mentioned in the comment it's shorten version of content that users can see on GitHub repository.
|
|
||
| spec.source = { :git => "https://github.com/niw/KeyboardGuide.git", :tag => "#{spec.version}" } | ||
| spec.source_files = "Sources", "Sources/**/*.{h,m,swift}" | ||
| spec.exclude_files = "Sources/Exclude" |
niw
Oct 24, 2020
Owner
This exclude_files is not needed, and path seems irrelevant.
This exclude_files is not needed, and path seems irrelevant.
| spec.platform = :ios, "11.0" | ||
|
|
||
| spec.source = { :git => "https://github.com/niw/KeyboardGuide.git", :tag => "#{spec.version}" } | ||
| spec.source_files = "Sources", "Sources/**/*.{h,m,swift}" |
niw
Oct 24, 2020
Owner
This should be spec.source_files = "Sources/KeyboardGuide/*.swift" a little bit explicitly, in case later adding test target or others, which shouldn't be a automatically part of source_files.
This should be spec.source_files = "Sources/KeyboardGuide/*.swift" a little bit explicitly, in case later adding test target or others, which shouldn't be a automatically part of source_files.
| spec.source_files = "Sources", "Sources/**/*.{h,m,swift}" | ||
| spec.exclude_files = "Sources/Exclude" | ||
|
|
||
| spec.swift_version = '4.2' |
niw
Oct 24, 2020
Owner
This swift_version is not needed I think, also 4.2 is quite old.
This swift_version is not needed I think, also 4.2 is quite old.
|
Hi @niw! Actually, I agree wholeheartedly with all of the points you made. I didn't know about the Thanks! |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Thank you for your work on this library!
I've created a Podspec file so it can be included into projects that use Cocoapods for dependency management. I've tested it on one of the projects I'm working on, and the spec passes the lint validation (
pod lib lint).I improvised the extended
descriptionfield, so you may want that changed.