這些錯(cuò)誤基本cocoapods升級版本到1.0.0所造成的
錯(cuò)誤1
當(dāng)寫在Podfile文件中的第三方框架,不能使用,找不到時(shí)
查看Pods文件夾,是否下載了所需要的第三方框架,沒有的話就 pod update
錯(cuò)誤2
Could not automatically select an Xcode project. Specify one in your Podfile like so:xcodeproj 'path/to/Project.xcodeproj'
在Podfile文件里指定下工程目錄就行了
xcodeproj 'Demo/Demo.xcodeproj'
但是如果cocoapods版本為(1.0.0)的話,可能會(huì)有以下警告
[!] xcodeproj was renamed to project
. Please use that from now on.
這時(shí)只需要把xcodeproj改為 project就行了
project 'Demo/Demo.project'
錯(cuò)誤3
The dependency
AFNetworking (~> 3.0)
is not used in any concrete target.
在Podfile中添加
target‘項(xiàng)目名'do (如 target 'Demo' do )
錯(cuò)誤4、
[!] Invalid
Podfile
file: syntax error, unexpected end-of-input, expecting keyword_end.
在Podfile的末尾添加 end
錯(cuò)誤5
Unable to find the Xcode project
/Volumes/BIAO/iOS/code/MBWB.xcodeproj
for the targetPods
.
在Podfile中 將 project 'Demo/Demo.project’ 改成 project 'Demo.project'
錯(cuò)誤6
build diff: /../Podfile.lock: No such file or directory
在工程設(shè)置中的Build Phases下刪除Check Pods Manifest.lock及Copy Pods Resources
還有一個(gè)更新慢的問題:無論是執(zhí)行pod install還是pod update都卡在了Analyzing dependencies不動(dòng)
原因在于當(dāng)執(zhí)行以上兩個(gè)命令的時(shí)候會(huì)升級CocoaPods的spec倉庫,加一個(gè)參數(shù)可以省略這一步,然后速度就會(huì)提升不少。加參數(shù)的命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update