使用cocoapods導入第三方后 報錯_OBJC_CLASS_$_XXX
我們手動導入第三方庫的時候,感覺管理不是很方便,于是會選擇使用Cocoapods管理?,F在記錄一下使用心得,當使用cocoapods導入afnetworking或者其他框架的時候,發(fā)現調用的時候總是報錯。
? "_OBJC_CLASS_$_SVProgressHUD", referenced from:
? ? ? objc-class-ref in XXXX.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
?在網上搜索了一堆的攻略,然而這并沒有什么卵用。
經過不斷地搜索終于在網上看到了和我有相同問題的文章,解決了這個問題。
他是通過這個發(fā)現解決方法的
用cocoapod更新框架的時候,發(fā)現終端的一段警告
[!] The `myQQ [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
? ? - Use the `$(inherited)` flag, or
? ? - Remove the build settings from the target.
這下有了思路了,原來之前手動導入第三方庫的時候,修改了Other Linker Flags

所以解決辦法就是:
按照提示,增加$(inherited)

添加之后,問題終于解決