iOS開發(fā)筆記-133:從intel遷移項目到M2,遇到的問題

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容