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 (實際上就是幾個常見的git托管站都有哈哈哈哈) 假如打開Podfile界睁,我們可以看到這么一條 source 'https://github.com/CocoaPods/Specs.git'將這個也換為剛剛repo使用的源奴烙,否則依然會從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/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
pod install
3,pod清空本地搜索搜不到問題
1.執(zhí)行pod setup
(完成后再搜索還搜索不到執(zhí)行第二步)
2.刪除~/Library/Caches/CocoaPods目錄下的search_index.json文件(手動刪除或 終端輸入:rm ~/Library/Caches/CocoaPods/search_index.json
)
3.執(zhí)行pod search
(就可以啦)
4矗漾,pod install 時遇到
Unable to find a specification for 三方類名
排查問題
排查問題順序
1锈候,cocoaPods是否安裝完成,執(zhí)行 ls | grep PLMedia*敞贡,若為空則需重新 update CocoaPods 把 ~/.cocoapods 目錄刪除泵琳,重新執(zhí)行 pod setup
2,cocoaPods是否有該第三方庫誊役。
3获列,確定有該庫后查看庫版本號是否匹配可用。
4蛔垢,查看庫支持的iOS 系統(tǒng)版本击孩。
1, pod deintegrate
清除項目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)
最新切維護中
gem sources -l