[英]How to add a private CocoaPod as a dependency in another pod .podspec file?
I am working on a private pod and that is dependent on other private pod. 我正在开发一个私有pod,它依赖于其他私有pod。 So i just want to mention it in my pod .podspec file. 所以我只想在我的pod .podspec文件中提及它。
Its looks like this in .podspec file of pod2. 它在pod2的.podspec文件中看起来像这样。
s.dependency 'Pod1', '~> 0.0.1' , :git => 'https://github.com/MY_COMPANY/pod1.git', :commit => '9f9f4fe5b5959e0f2ea89e472eccf7aea6f37eea'
And i came to know that "there is no :git and :commit options in podspec dependency specifier" so if not then how to achieve that thing? 我开始知道“在podspec依赖说明符中没有:git和:commit选项”所以如果没有那么如何实现那个东西呢?
You have to maintain a repository for your private podspecs. 您必须维护私有podspecs的存储库。
Add that repository to your CocoaPods installation: 将该存储库添加到CocoaPods安装:
pod repo add MyPrivateSpecs git@git.example.com:MyPrivateSpecs
Add your private dependency pod to it: 将私有依赖项pod添加到其中:
pod repo push MyPrivateSpecs Pod1
Now you can simply reference that pod like you normally would: 现在您可以像往常一样简单地引用该pod:
s.dependency 'Pod1', '~> 0.0.1'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.