Multiple private copies
I have a private repo that lets you say "A" that has some public dependencies like AFNetworking etc. I created a pod spec file for this "A" and used it in another library project "B", everything worked well and the library project compiled.
Now I also want to use "B" (which is also a private repo) in my project, I created a package spec file for "B" and included only dependency "A" in it. The same with the Pod file included "A" as a dependency like
pod 'A', :git => 'https://github.com/privateRepo/A.git', :tag => 'v1.0.0'
and in the podspec file like
s.dependency 'A', :git => 'https://github.com/privateRepo/A.git', :tag => 'v1.0.0'
When I do pod spec lint. I get
-> B.podspec
- ERROR | [spec] The specification defined in `B.podspec` could not be loaded.
[!] Invalid `B.podspec` file: [!] Unsupported version requirements. Updating CocoaPods might fix the issue.
# from B.podspec:18
# -------------------------------------------
# # Dependencies
> s.dependency 'A', :git => 'https://github.com/privateRepo/A.git', :tag => 'v1.0.0'
#
# -------------------------------------------
from pods --version my cocoapod version is 0.33.1
From this post I think it cannot be done in cocoapods. Can anyone help! Thanks to
source to share
Cocoapods does not support git repo dependency, you have to press "A" on "Private props" and set the dependency in your B.podspec:
s.dependency 'A', "~> 1.0"
Then lint with --sources
pod spec lint B.podspec --sources=PrivateSpecRepoNameOrGitURL,master
source to share