Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
236 views
in Technique[技术] by (71.8m points)

ios - CocoaPods: point to a branch in pod spec

I'm trying to install code from a repository's branch on a pod spec, and based on the documentation, this should work:

s.dependency 'repository_name',
:git => 'https://github.com/account_name/repository_name.git',
:branch => 'experimental_branch'

But I get an error with something like [!] Unsupported version requirements. Updating CocoaPods might fix the issue.

It works when installing from a pod file directly:

pod 'ObjectiveRecord', :git => 'https://github.com/supermarin/ObjectiveRecord.git', :branch => '2-0-experimental'

Does anyone know? Thanks!

question from:https://stackoverflow.com/questions/25140362/cocoapods-point-to-a-branch-in-pod-spec

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can't use a pod dependency like that, it only supports "name", "version". Source: guides.cocoapods.org. It is expected that the :git and :branch metadata will come from the podfile.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...