New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Podspec dependency on a SPM package #5903
Comments
IMO, we should make it as easy as possible to convert existing CocoaPods libraries into Apple's Swift PM format and make that the way in which people migrate to the officially sanctioned dependency manager. Adding support for Swift Packages as a dependency of CocoaPods seems like another place where Apple will reasonably break an existing CocoaPods project because we made it work with last years SwiftPM format. |
Another issue with this would be that swiftpm packages cannot reasonably partake in the resolver which would be a nightmare once transitive dependencies come into play. For example, what happens when the swiftpm dependency depends on AFNetworking and so does one of the Pods? I was toying with a similar idea back when Carthage came out and abandoned it because of this. I agree with orta that a better way is providing tooling to make it easy for library maintainers to support multiple or to migrate between different dependency managers. |
Long term, I think the role of CocoaPods will be pod discovery and anything that touches anything that deals with Objective-C. So what I am hearing here sounds like:
Then eventually peer pressure from downstream will motivate people to drop/replace Objective-C dependencies. OK, this makes sense and does not require functional changes from CocoaPods. Thanks for the discussion! |
Maybe to be polite: in the future when someone runs
That's something to think about later. |
SwiftPM also supports Objective-C: https://github.com/apple/swift-evolution/blob/master/proposals/0038-swiftpm-c-language-targets.md |
Yeah, this is great, hopefully by WWDC 2017 we can start recommending people support it 馃憤 |
CocoaPods' Podspec file format provides information about a pod and lists dependencies needed to build that pod. Now that Apple, the "upstream vendor", has publicly released Xcode, there is a competing standard for publishing and packaging Swift code, Swift Package Manager.
To promote interoperability, this issue advocates allowing pods to express a dependency on SPM packages.
Dependency
Express such dependencies like this:
or
Swift has more expressive ways to define version dependencies. To resolve this issue, I recommend we only implement explicit version dependencies for MVP.
Fetching
CocoaPods will need to integrate these new dependencies into the xcode workspace. The
swift
command line tool makes this much more simple.The text was updated successfully, but these errors were encountered: