I have created 2 private pods first one is PrivatePodAA and second one is PrivatePodBB , I can successfully use PrivatePodBB in PrivatePodAA podfile but while trying to add it as dependency in PrivatePodAA podspec file and trying to install PrivatePodAA as a pod in new project it's showing :
Unable to find a specification for `PrivatePodBB` depended upon by `PrivatePodAA`
I have created my own private repo and added PrivatePodBB podspec file in it.
Below my podfile for PrivatePodAA
which is working perfectly :
// 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
And below podspec file for PrivatePodAA
which which causing the problem :
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
Also while running : pod spec lint --sources=my-private-repo,master
working perfectly
So, please what is missed from the above code ?
After searching I have finally reached to that adding the source for my private repo to my new project solving my problem .. Below sample podfile for my new project :
source 'https://privateurl.prv/scm/ios/sdhub.git'
source 'https://github.com/CocoaPods/Specs.git'
target 'testPrivatePod' do
# Pods for testPrivatePod
pod 'PrivatePodAA', :git => 'https://privateurl.prv/scm/ios/PrivatePodAA.git', :branch => 'privatePods'
end