項目中經常會更新第三方pods,有時候我們必須更新本地repo
pod repo update [NAME]
Updates the local clone of the spec-repo NAME.
If NAME is omitted this will update all spec-repos in ~/.cocoapods/repos.
上面是官方的建議
然而在國內的一些眾所周知的原因,不太方便,很慢,鏡像有時候也不穩(wěn)定,所以一個小tip可以嘗試下
- 我們找到本地CocoaPods目錄/Users/<username>/.cocoapods/repos/master/Specs
就是我們需要更新的。 - 下載最新CocoaPods Specs,下載后替換掉本地Specs
- 刪除本地 /Users/<username>/Library/Caches/CocoaPods/search_index.json
然后相應的執(zhí)行pod update [Pods] --verbose --no-repo-update快速更新某pods
bingo~