如何在我的PODSPEC中添加私有POD作为依赖性?
我有一个对PODB有依赖性的poda。我本人同时将Poda和Podb做到了,然后将它们推到了两个单独的存储库中,然后将它们的Podspecs推到了一个共享的Podspec仓库中。
在PODB的PODSPEC中,我想将PODA添加为依赖性,因此我在PODB的PODSpec文件中包含以下行:
spec.dependency 'PodA', '~> 0.1.0'
我还将源包含在PODB的POD文件中,并且还添加为依赖性:
source '[email protected]:PodASourceHere.git'
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'PodB' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for PodB
pod 'PodA', '~> 0.1.0'
end
但是,当我运行POD LIB LINT时在PODB上,我会收到以下错误:
ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for `PodA (~> 0.1.0)` depended upon by `PodB`
我阅读了另一个命令“ Pod Repo推”,Cocoapods在PODB的PODSpec中检测实际的POD名称“ PODA”是否需要这是必要的?这会向公众展示PODA吗?这是将私有豆荚作为依赖项包含的唯一方法吗?
I have a PodA which has a dependency on PodB. I made both PodA and PodB myself and I pushed them to two separate repos, and also their podspecs into a single shared podspec repo.
In the podspec for PodB, I want to add PodA as a dependency, so I included the following line in PodB's podspec file:
spec.dependency 'PodA', '~> 0.1.0'
I also include the source in PodB's pod file and also add is as a dependency:
source '[email protected]:PodASourceHere.git'
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'PodB' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for PodB
pod 'PodA', '~> 0.1.0'
end
However when I run pod lib lint on PodB I get the following error:
ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for `PodA (~> 0.1.0)` depended upon by `PodB`
I read about another command "pod repo push", is this necessary for cocoapods to detect the actual pod name "PodA" in PodB's podspec? Will this expose PodA to the public for use? Is this the only way to include private pods as dependencies?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论