44

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!

4

2 回答 2

52

您不能使用这样的 pod 依赖项,它只支持"name", "version". 资料来源:guides.cocoapods.org。预计:git:branch元数据将来自 podfile。

于 2014-08-05T14:31:40.583 回答
-1

请在此处查看讨论 -链接

我认为根据讨论现在有可能,但最初 -

他们建议使用标签而不是分支,因为分支与标签的问题在于分支没有指定历史记录中的特定点,而标签却可以。这种区别非常重要,因为我们需要保证根据库的特定版本,每次都会使用相同的源。从技术上讲,可以删除标签并再次创建它以指向不同的提交,但这不太可能发生。

于 2020-03-18T13:09:34.537 回答