Closed 1ec5 closed 7 years ago
Isn't this a CocoaPods bug then?
I don’t think it is. As far as I can tell, the ~> 0.3.0
in the podspec means an official source distributed through CocoaPods.org is required. But the Swift 2.3 branch requires an external source instead, so the ~> 0.3.0
is misleading and conflicts with the Git/branch requirement in the podfile.
Shouldn't your Podfile look like this then?
pod 'OctoKit', :git => 'https://github.com/nerdishbynature/OctoKit.swift.git', :branch => 'swift-2.3'
pod 'NBNRequestKit', :git => 'https://github.com/nerdishbynature/RequestKit.git', :branch => 'swift-2.3'
It doesn’t matter what order the dependencies are listed in the podfile. The podfile and OctoKit.swift podspec will conflict anyways:
Pre-downloading: `NBNRequestKit` from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`
Pre-downloading: `OctoKit.swift` from `https://github.com/nerdishbynature/octokit.swift.git`, branch `swift-2.3`
[!] Unable to satisfy the following requirements:
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (~> 0.3.0)` required by `OctoKit.swift (0.6.1)`
Specs satisfying the `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`), NBNRequestKit (~> 0.3.0)` dependency were found, but they required a higher minimum deployment target.
(The bit about the higher minimum deployment target does appear to be a bug in CocoaPods. I’m seeing this in a project that has the minimum iOS deployment target set to iOS 8.0, which matches RequestKit’s Swift 2.3 branch.)
This is still problematic. Using octokit.swift’s swift-2.3
branch installs NBNRequestKit 0.3.0, which is not compatible.
Manually specifying NBNRequestKit :branch => 'swift-2.3'
in the Podfile results in the same error as above:
Pre-downloading: `OctoKit.swift` from `https://github.com/nerdishbynature/octokit.swift.git`, branch `swift-2.3`
[!] Unable to satisfy the following requirements:
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (~> 0.3.0)` required by `OctoKit.swift (0.6.1)`
Hey, sorry for the delay, hectic times. I still think this is a cocoa pods bug and opened an issue: https://github.com/CocoaPods/CocoaPods/issues/5912
I will release Swift 2.3 and Swift 3.0 releases today.
Seems like this was the fix we needed https://github.com/nerdishbynature/octokit.swift/pull/45/commits/2569857dd186f027c428e75cca7940e3d9544121
Thanks @pietbrauer, Swift 2.3 support is 💯.
In order for a project to use this Swift 2.3 branch, it also needs to use RequestKit’s Swift 2.3 branch by overriding the NBNRequestKit entry in the Podfile:
This PR removes the version requirement from the NBNRequestKit dependency, resolving the conflict that arises when the Podfile specifies an external source for NBNRequestKit:
/ref #45 /cc @pietbrauer