简体   繁体   English

如何在另一个pod .podspec文件中添加私有CocoaPod作为依赖项?

[英]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.

相关问题 在 .podspec 文件中包含一个私有 Pod 作为另一个私有 Pod 的依赖项 - Including a private pod as a dependency of another private pod in .podspec file 如何使用私有pod作为另一个pod的podspec中的依赖项? - How to use a private pod as a dependency in the podspec of another pod? 如何在CocoaPod的.podspec文件中的“s.dependency”属性中添加fork存储库? - How to add a fork repository to “s.dependency” attribute in .podspec file of a CocoaPod? 将带有源的 Pod 依赖项添加到 .podspec - Add Pod dependency with source to .podspec 将带有 static 框架的 pod 作为 podspec 中的依赖项连接到另一个 pod - Connect pod with static framework to another pod as dependency in podspec 将私有pod添加到podfile作为依赖项 - Add private pod to podfile as dependency 无法将私有Pod添加为其他Pod中的依赖项? - Could not add private pod as a dependency in other pod? 是否所有开发人员都需要访问私有 cocoapod 存储库(而不是私有 podspec)? - Do all developers require access to private cocoapod repo (not private podspec)? 尝试运行`pod trunk push [cocoapod] .podspec`时出错 - Error when trying to run `pod trunk push [cocoapod].podspec` 如何在CocoaPod PodSpec中创建Ruby字符串? - How to create a Ruby string within a CocoaPod PodSpec?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM