Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Private repo cocoapods

I have a private repo lets say 'A' which has some public pods dependencies like AFNetworking and so on. I created a pod spec file for this 'A' and used it in another library project 'B', everything worked fine and library project compiled.

Now I also want to use 'B' (which is also a private repo) in my project I created pod spec file for 'B' and included the only dependency 'A' in it. Did same with Pod file included 'A' as dependency like

pod 'A', :git => 'https://github.com/privateRepo/A.git', :tag => 'v1.0.0'

and in 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 its not possible to do that in cocoapods. Can anybody please help! Thanks

like image 384
Hussain Mansoor Avatar asked Aug 24 '14 09:08

Hussain Mansoor


1 Answers

Cocoapods does not support dependency from git repo, you must push 'A' to your Private Spec Repo, and set dependency in your B.podspec:

s.dependency 'A', "~> 1.0"

Then lint with --sources

pod spec lint B.podspec --sources=PrivateSpecRepoNameOrGitURL,master
like image 88
Mr. Míng Avatar answered Oct 02 '22 06:10

Mr. Míng