更换国内的镜像
$ cd ~/.cocoapods/repos
$ pod repo remove master
$ git clone https://gitee.com/mirrors/CocoaPods-Specs.git master (此镜像更快速,几m每秒)
也可以用清华镜像,比较慢
$ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
把项目podfile里的source换:
source 'https://gitee.com/mirrors/CocoaPods-Specs.git master'
cd到项目目录: pod install