Cocoapods:无法找到[PrivateClientSpec]所依赖的[Pri​​vateSpec]规范 [英] Cocoapods: Unable to find a specification for [PrivateSpec] depended upon by [PrivateClientSpec]

查看:218
本文介绍了Cocoapods:无法找到[PrivateClientSpec]所依赖的[Pri​​vateSpec]规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用私有存储库来分解更大的应用程序。我已按照指南进行操作:

I am trying to use private repositories to break up a larger application. I have followed the guides at:

  • http://www.objectpartners.com/2014/06/25/developing-private-in-house-libraries-with-cocoapods/
  • http://guides.cocoapods.org/making/private-cocoapods.html
  • How to add a private CocoaPod as a dependency in another pod .podspec (similar but a different problem)

我创建了一个包含规范的本地存储库,通过

I have created a local repository to contain the specs, published to cocoapods via

pod远程添加MySpecs~ / local / path / to / MySpecs.git

验证cocoapods看到它们通过查看〜/ .cocoapods / repos / MyS的内容pecs

verified that cocoapods sees them by looking at the contents of ~/.cocoapods/repos/MySpecs

我在 PrivateClientSpec中引用了 PrivateSpec 如下:

I have referenced PrivateSpec within PrivateClientSpec as follows:

s.dependency'PrivateSpec''〜> 0.1.0'

问题是当我尝试lint这个 PrivateClientSpec ,我得到了名义错误:

The problem is that when I try to lint this PrivateClientSpec, I get the titular error:

无法找到[PrivateClientSpec]所依赖的[Pri​​vateSpec]规范

我错过了什么吗?据我所知,这是受支持的行为。我正在使用cocoapods v0.35。

Am I missing something? From what I understand, this is supported behavior. I am using cocoapods v0.35.

谢谢!

推荐答案

原因是 pod规格 linter仅检查主规格,因此无法找到您的私人规格。

The reason is that the pod spec linter is only checking the master specs, so it can't find your private one.

您需要使用 - 来源选项,如下所示:

You'll need to use the --sources option, like this:

pod spec lint --sources='git@our-private-spec-repo:iOS/Specs.git,https://github.com/CocoaPods/Specs'

两件事两说:


  • 您的私人规格需要在线,无法检查本地的

  • 如果您依赖其他pod,您还需要为他们的Spec repo添加URL,这就是为什么在示例中我们也有 https://github.com/CocoaPods/Specs

  • Your private specs need to be online, can't check on a local one
  • If you depend on other pods you'll need to add the URL for their Spec repo too, that's why in the example we have https://github.com/CocoaPods/Specs too.

通过运行 pod spec lint --help ,您可以阅读有关此选项的更多信息:

By running pod spec lint --help you can read more about this option:

--sources=https://github.com/artsy/Specs   The sources from which to pull
                                           dependant pods (defaults to
                                           https://github.com/CocoaPods/Specs.git).
                                           Multiple sources must be
                                           comma-delimited.

更多关于此此处此处

这篇关于Cocoapods:无法找到[PrivateClientSpec]所依赖的[Pri​​vateSpec]规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆