CocoaPods pod install速度慢的解决方案

日常开发中,pod使用的github源。在执行相关命令(例如:pod install)速度会很慢,针对这种情况我们可以把pod源切换到gitee源。
1、进入到.cocoapods目录

cd /Users/用户/.cocoapods

2、添加gitee源(地址:https://gitee.com/mirrors/CocoaPods-Specs)【注意使用ssh方式clone,不要使用https方式clone,使用https方式clone会很慢】

git repo remove master
git clone [email protected]:mirrors/CocoaPods-Specs.git master
Cloning into 'master'...
remote: Enumerating objects: 42984, done.
remote: Counting objects: 100% (42984/42984), done.
remote: Compressing objects: 100% (19445/19445), done.
remote: Total 4598842 (delta 26356), reused 36040 (delta 21977), pack-reused 4555858
Receiving objects: 100% (4598842/4598842), 783.87 MiB | 10.83 MiB/s, done.
Resolving deltas: 100% (2937184/2937184), done.
Updating files: 100% (467733/467733), done.
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

      'Specs/5/1/1/Governor/1.0.11-APPS-1582-beta11/Governor.podspec.json'
     'Specs/5/1/1/Governor/1.0.11-apps-1582-beta11/Governor.podspec.json'

3、在podfile中添加source源

source '[email protected]:mirrors/CocoaPods-Specs.git'

你可能感兴趣的:(CocoaPods pod install速度慢的解决方案)