美文网首页
iOS cocoapods pod setup命令失败解决方法

iOS cocoapods pod setup命令失败解决方法

作者: 奔跑吧小蚂蚁 | 来源:发表于2020-01-10 01:25 被阅读0次

我们知道 cocoapods 的 sepcs 文件是放在这个目录里面

~/.cocoapods/repos

所以可以直接 cd 到该目录下然后运行命令:

git clone https://github.com/CocoaPods/Specs.git master

然后会发现clone 的文件很大,由于速度也很慢,一不小心就失败了。

其实我们无需全部 clone 下来,可以只 clone 最近一个 commit 的全部代码就可以了。

git clone --depth=1  https://github.com/CocoaPods/Specs.git master

不用多久就 clone 成功了,这时候就直接可以使用pod install 最新版本的 library 了。

http://www.mamicode.com/info-detail-1874887.html
https://my.oschina.net/daguoshi/blog/827877

相关文章

网友评论

      本文标题:iOS cocoapods pod setup命令失败解决方法

      本文链接:https://www.haomeiwen.com/subject/qkzuactx.html