为什么cocoapods每次都会克隆spec-repo

问题描述 投票:1回答:1

我有一个大项目,我喜欢跳来跳去我的git历史..

有时当我到我的git历史的顶部..然后我运行我的Xcode项目它失败,出现以下错误:

如果我运行pod install ..我得到这个:

pod install --verbose

Analyzing dependencies

Updating spec repositories
  $ /usr/bin/git rev-parse  >/dev/null 2>&1
  $ /usr/bin/git ls-remote
  From https://github.com/CocoaPods/Specs.git
  09b0e7431ab82063d467296904a85d72ed40cd73  HEAD
  ..

所以它基本上做了pod setup ..这被定义为

$ pod setup

  Creates a directory at `~/.cocoapods/repos` which will hold your spec-repos.
  This is where it will create a clone of the public `master` spec-repo from:

      https://github.com/CocoaPods/Specs

  If the clone already exists, it will ensure that it is up-to-date.

但我以前曾多次使用过cocoapods ..但是如果我去我的主目录,我没有看到这个~/.cocoapods/repos目录..这是否意味着它必须每次都要克隆这个pod spec repo?这是size的巨大回购,每次更新它都非常耗时。我如何确保不再发生这种情况?有没有办法跳过下载这个巨大的回购开始?

ios objective-c iphone xcode cocoapods
1个回答
0
投票

可能你的.gitignore文件不包括你的Pods文件夹。当你切换纪念品时,它会检测到你的Pods文件夹与你的Podfile.lock不同步(指向哪个特定版本的pod应该在Pods上)。

我建议取消该文件夹的签名并将其提交给您的主仓库。这样你就可以自由地检查git提交而无需运行任何pod命令。

© www.soinside.com 2019 - 2024. All rights reserved.