1: Homebrew、cocopods安裝
安裝Homebrew時,報錯系統(tǒng)太舊,但是系統(tǒng)已經(jīng)是最新的。
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)!
用這個解決:
/bin/zsh -c "$(curl -fsSL [https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh](https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh))"
也可以用這里的方法:
https://zhuanlan.zhihu.com/p/90508170?utm_medium=social&utm_oi=1117506435474448384
Homebrew安裝好后
然后brew install cocoapods
2:Command PhaseScriptExecution failed with a nonzero exit code
然后看報錯詳情: Bad CPU type in executable
原來是R.swift項目太舊,依賴和現(xiàn)在的芯片不匹配
R.swift項目更新后,需要把build Phases- Run Script- Based on dependency analysis 去掉
后面把Kingfisher也更新到最新版本了
3:Unknown argument '-all-load'; did you mean '-all_load'?
把buildsetting里的-all-load改為-all_load
4:打包的時候,HandyJSON有問題,建議后續(xù)不要用HandyJSON了
Pods-> HandyJSON->Compilation Mode 選擇為 Incremental
5:調(diào)試的時候出現(xiàn):Sandbox: rswift(51074) deny(1) file-read-data /Users/x x x x x x x/Pods/R.swift/rswif
build setting搜索ENABLE_USER_SCRIPT_SANDBOXING,YES(默認(rèn))改成NO