升級(jí)到最新版本的Cocoapods之后,大家可能會(huì)遇到一些新的問題:
1.使用cocoapods導(dǎo)入第三方類庫后頭文件沒有代碼提示
解決: 選擇Target -> Build Settings 菜單,找到\”User Header Search Paths\”設(shè)置項(xiàng),新增一個(gè)值"${SRCROOT}",并且選擇\”Recursive\”
2.The dependency “ is not used in any concrete target.
解決: 這個(gè)錯(cuò)誤是說明你沒有使用下面的格式, 將 Podfile編輯成下面的格式
platform :ios,'7.0'
target '你的app的target名字' do
pod 'AFNetworking', '2.0'
pod 'SDWebImage', '3.7'
...
end
這樣就能完美解決了.
另外附上一些平時(shí)常見的問題:
3.無論是執(zhí)行pod install還是pod update都卡在了Analyzing dependencies 或者 Updating local specs repositories不動(dòng)
解決: 原因在于當(dāng)執(zhí)行以上兩個(gè)命令的時(shí)候會(huì)升級(jí)CocoaPods的spec倉庫,加一個(gè)參數(shù)可以省略這一步,然后速度就會(huì)提升不少。加參數(shù)的命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update
4.Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
解決: 不要使用文本編輯去編輯Podfile,使用Xcode編輯,或者使用終端敲命令去編輯?;蛘咻斎敫袷藉e(cuò)誤,沒輸入運(yùn)行版本:
platform:iOS, '7.0'
5.安裝錯(cuò)誤

解決:
$ git config --global http.postBuffer 24288000
$ git config --list
若輸出 http.postbuffer=24288000, 就 OK了.