检查 CocoaPods 版本```shell
pod —version
更新镜像地址<a name="4j045"></a>### CocoaPods 版本 < 1.9```shellpod repo remove master // 移除master源pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git // 添加清华源pod repo update // 更新资源库
CocoaPods 版本 >= 1.9
cd ~/.cocoapods/repos // 进入pods资源库pod repo remove master // 移除master源git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master // 克隆清华源
项目指定源
最后进入自己的工程,在自己工程的Podfile 第一行加上:
//==> ios/Podfilesource 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
