我會(huì)逐漸把項(xiàng)目中遇到的問(wèn)題記錄在這篇文章,放便后期查閱。
- 1.接收項(xiàng)目初次加載pods出現(xiàn)
resources.sh: Permission denied問(wèn)題
分析原因:是因?yàn)樵L問(wèn)該文件的操作權(quán)限出現(xiàn)問(wèn)題,所以解決方向就是添加訪問(wèn)文件的權(quán)限。
解決方法:
a. 項(xiàng)目中查找.sh,找到sh文件,右鍵Show In Finder,

b. cd+
Pods-項(xiàng)目名-resources.sh 路徑,
cd /Users/xx/Desktop/xx/xx/Pods/Target\ Support\ Files/Pods-xx/Pods-xx-resources.sh

c. 執(zhí)行添加權(quán)限命令,chmod a+x Pods-項(xiàng)目名-resources.sh路徑,按回車即可添加。
chmod a+x /Users/xxx/Desktop/xx/xx/Pods/Target\ Support\ Files/Pods-xxx/Pods-xx-resources.sh
語(yǔ)法: chmod 用戶 操作 權(quán)限 文件名
chmod:命令
a:表示全部用戶
+:表示增加權(quán)限
x:表示可執(zhí)行的權(quán)限
Pods-xx-resources.sh:表示要修改的文件名

+2. 項(xiàng)目中引用KissXML三方庫(kù)的時(shí)候報(bào)錯(cuò)'libxml/tree.h' file not found
分析原因:缺少libxml文件,解決方向是添加庫(kù)文件
解決方法:
a.項(xiàng)目中添加libxml2.tbd包


b.Header Search Paths 添加包路徑${SDK_ROOT}/usr/include/libxml2

再次運(yùn)行即可,如果上次都添加后還報(bào)錯(cuò) ,多試幾次,或者關(guān)掉xcode重新試一下。
- 3 引入``MOBFoundation.framework
報(bào)如下錯(cuò)誤:"___gxx_personality_v0", referenced from:
Undefined symbols for architecture arm64:
"___gxx_personality_v0", referenced from:
-[MOBFErrorReport initWithAppKey:sdkType:sdkVersion:] in MOBFoundation(MOBFErrorReport.o)
-[MOBFErrorReport initWithAppKey:productType:sdkVersion:] in MOBFoundation(MOBFErrorReport.o)
-[MOBFErrorReport writeErrorDataWithMsg:] in MOBFoundation(MOBFErrorReport.o)
-[MOBFErrorReport writeError:forType:] in MOBFoundation(MOBFErrorReport.o)
-[MOBFBigInteger init] in MOBFoundation(MOBFBigInteger.o)
-[MOBFBigInteger initWithInt:] in MOBFoundation(MOBFBigInteger.o)
-[MOBFBigInteger initWithBigInteger:] in MOBFoundation(MOBFBigInteger.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

分析原因:缺少系統(tǒng)庫(kù)
解決方法:
a.項(xiàng)目中添加如下系統(tǒng)庫(kù)文件
libstdc++.tbd
JavaScriptCore.framework
libz.tbd
libicucore.tbd
如果實(shí)在不行,重新添加再次運(yùn)行即可
- 4 引用
RegexKitLite正則表達(dá)式庫(kù)報(bào)錯(cuò)

解決方法:在Other Linker Flags 中添加-licucore就可以了。

- 5.使用CocoaPods 更新庫(kù)的時(shí)候報(bào)錯(cuò)
[!] CocoaPods could not find compatible versions for pod "xxxx":
In Podfile:
xxxx (~> 4.11.0)
Specs satisfying the `xxxx (~> 4.11.0)` dependency were found, but they required a higher minimum deployment target.

解決方法:
找到要pod的庫(kù)支持的最低版本

然后重新pod install安裝一下即可。
先記錄這些,感謝閱讀,如有錯(cuò)誤,不吝賜教!