CocoaPods 升级新版本(pod install 卡顿)遇

2020-05-07  本文已影响0人  SineYiNing

重新安装cocoapods后,执行 pod install时 Cloning spec repo cocoapods from https://github.com/CocoaPods/Specs.git 卡住
可以进行以下操作,此处是摘自清华大学开源软件镜像站
新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是可以:

$ cd ~/.cocoapods/repos
$ pod repo remove master
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
$ cd ~/.cocoapods/repos/master
# 最后update
$pod repo update

最后进入自己的工程,在自己工程的podFile第一行加上:
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'

image.png
完事之后记得remove trunk ,执行下面的命令
pod repo remove trunk
上一篇 下一篇

猜你喜欢

热点阅读