CocoaPods: point to a branch in pod spec

匿名 (未验证) 提交于 2019-12-03 02:50:02

问题:

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!

回答1:

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!