1,pod repo 切換源
pod repo remove master
pod repo add master https://gitcafe.com/akuandev/Specs.git
pod repo update
目前搜集到的可選源有 https://gitcafe.com/akuandev/Specs.git http://git.oschina.net/akuandev/Specs.git https://git.coding.net/hging/Specs.git (實(shí)際上就是幾個(gè)常見(jiàn)的git托管站都有哈哈哈哈) 假如打開(kāi)Podfile,我們可以看到這么一條 source 'https://github.com/CocoaPods/Specs.git'將這個(gè)也換為剛剛repo使用的源,否則依然會(huì)從Github上面clone東西
最后,完成了上述兩處地方更改之后,就可以直接使用
pod install
pod update
2,pod清空本地緩存
pod cache clean --all # will clean all pods
pod cache clean 'FortifySec' --all # will remove all installed 'FortifySec' pods
重置pod
rm -rf ~/Library/Caches/CocoaPodsrm -rf Podsrm -rf ~/Library/Developer/Xcode/DerivedData/*pod deintegratepod setuppod install
3,pod清空本地搜索搜不到問(wèn)題
1.執(zhí)行pod setup (完成后再搜索還搜索不到執(zhí)行第二步)
2.刪除~/Library/Caches/CocoaPods目錄下的search_index.json文件(手動(dòng)刪除或 終端輸入:rm ~/Library/Caches/CocoaPods/search_index.json)
3.執(zhí)行pod search(就可以啦)
4,pod install 時(shí)遇到
Unable to find a specification for 三方類名 排查問(wèn)題
排查問(wèn)題順序
1,cocoaPods是否安裝完成,執(zhí)行 ls | grep PLMedia*,若為空則需重新 update CocoaPods 把 ~/.cocoapods 目錄刪除,重新執(zhí)行 pod setup
2,cocoaPods是否有該第三方庫(kù)。
3,確定有該庫(kù)后查看庫(kù)版本號(hào)是否匹配可用。
4,查看庫(kù)支持的iOS 系統(tǒng)版本。
1, pod deintegrate清除項(xiàng)目cocoaPods
2,pod install
3,pod update
5,gem換源
gem sources --remove https://rubygems.org/
gem sources -a http://ruby.taobao.org/ (https://gems.ruby-china.com) 最新切維護(hù)中
gem sources -l