【发布时间】:2019-04-11 16:47:48
【问题描述】:
我创建了 2 个私有 pod,第一个是 PrivatePodAA,第二个是 PrivatePodBB,我可以在 PrivatePodAA podfile 中成功使用 PrivatePodBB,但是在尝试将其添加为 PrivatePodAA podspec 文件中的依赖项并尝试将 PrivatePodAA 作为新项目中的 pod 安装时它正在显示:
Unable to find a specification for `PrivatePodBB` depended upon by `PrivatePodAA`
我创建了自己的私有仓库并在其中添加了 PrivatePodBB podspec 文件。
在我的 PrivatePodAA 的 podfile 下方,它运行良好:
// my private repo url
source 'https://privateurl.prv/scm/ios/sdhub.git'
target 'PrivatePodAA' do
pod 'PrivatePodBB', :git => 'https://privateurl.prv/scm/ios/PrivatePodBB.git'
# pod 'PrivatePodBB' # this also working fine
end
下面是 PrivatePodAA 的 podspec 文件,这会导致问题:
Pod::Spec.new do |s|
s.name = 'PrivatePodAA'
s.source = {
:git => 'https://privateurl.prv/scm/ios/PrivatePodAA.git', :tag => s.version.to_s
}
s.dependency 'PrivatePodBB'
end
同时在运行时:pod spec lint --sources=my-private-repo,master
完美运行
那么,请问上面的代码遗漏了什么?
【问题讨论】: