我一直在开发一个 AFNetworking 分支存储库,并希望将其添加到我的私有(private) pod 中。我正在做这样的事情。
s.dependency 'AFNetworking', '~> 2.3' , :git => 'https://github.com/Codigami/AFNetworking.git', :commit => '9f9f4fe5b5959e0f2ea89e472eccf7aea6f37eea'
做的时候
pod install
在终端我得到
[!] Invalid `ios-authentication-pod.podspec` file: [!] Unsupported version requirements. Updating CocoaPods might fix the issue.
另一方面,我尝试使用它在新项目 podfile 中添加它。
pod 'AFNetworking', :git => 'https://github.com/Codigami/AFNetworking.git', :commit => '9f9f4fe5b5959e0f2ea89e472eccf7aea6f37eea'
这行得通。 我无法理解上述案例中的问题是什么?
最佳答案
http://guides.cocoapods.org/syntax/podspec.html#dependency
podspec 依赖说明符中没有 :git 和 :commit 选项。您可以创建自己的私有(private)规范 repo 并将 AFNetworking podspec 放在那里,并用 s.source
指向特定位置。
关于ios - 如何将 fork 存储库添加到 CocoaPod 的 .podspec 文件中的 "s.dependency"属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25738736/