1.Cordova iOS 项目接入cocopods
2.一进入会报错3个错误

3.关闭Xcode 进入文件根目录,寻找build.xconfig的文件

4.到Pods目录下找如下图文件 Pods-(项目名).debug.xconfig

5.将第四步找到的文件打开后,所有内容复制到第三步的文件中
6.重新打开xcode,编译后3个错误消失,引入库一切正常,但是调用库的时候报错OBJC_CLASS$_XXX

7.设置TARGETS - Build Settings - Other Linker Flags 添加$(inherited)

8.重新编译 成功运行!
tips:每次pod新的库,都得重复执行3-5步骤,否则framework search paths 不会找到相对的库,很坑!!!
网友评论