https://mirrors.tuna.tsinghua.edu.cn/git
CocoaPods 是一個 Cocoa 和 Cocoa Touch 框架的依賴管理器,具體原理和 Homebrew 有點相似,都是從 GitHub 下載索引,而後根據索引下載依賴的源代碼。框架
對於舊版的 CocoaPods 可使用以下方法使用 tuna 的鏡像:code
$ pod repo remove master $ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git $ pod repo update
新版的 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
最後進入本身的工程,在本身工程的podFile第一行加上:rem
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'