1

我正在尝试将最大 pod 版本设置到我的“Podfile”中,就像 AFNetworking 一样:

pod 'AFNetworking', '~> 2.0'

但我使用的是私有存储库,所以我还需要指定 git 存储库:

pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git'

cocoapods 指南:https ://guides.cocoapods.org/using/the-podfile.html示例展示了如何使用特定的分支、标记或提交:

pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :branch => 'dev'

pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :tag => '0.7.0'

pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :commit => '082f8319af'

但没有最大 pod 版本。

如何结合私有 git 存储库和最大 pod 版本?

4

1 回答 1

1

当使用存储库根目录中的 podspec 时(即,当您放入:gitPodfile 时),CocoaPods 将使用该存储库根目录中的 podspec。podspec 将附加一个固定的版本号,因此没有“最大”版本之类的东西,只有一个固定版本。

相反,如果您想发布私有 Pod 的各种版本,您可以将各种版本作为单独的 pod 规范包含在一个 pod 规范存储库中,请查看私有规范存储库的 CocoaPods 指南

于 2015-08-05T11:14:22.837 回答