最近總有童鞋詢問在制作 Cocoapods 私有庫時,遇到的問題。在此列幾個比較讓新手無頭緒的問題,供大家參考。
錯誤1
clang: error: linker command failed with exit code 1 (use -v to see invocation)

解決辦法
這個錯誤是缺少依賴的系統(tǒng)庫導(dǎo)致的。如果引入了第三方的庫,務(wù)必去相應(yīng)的官網(wǎng)查看到底引用哪些系統(tǒng)庫,必須全部配置到 podspec 文件中。
錯誤2
- ERROR | [iOS] unknown: Encountered an unknown error ([!] /Applications/Xcode.app/Contents/Developer/usr/bin/git clone http://xxx.git/var/folders/xx/xxx/xxx–template= –single-branch –depth 1 –branch 0.1.0 Cloning into /var/folders/xx/xx/xx… fatal: Remote branch 0.1.0 not found in upstream origin ) during validation.
