·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> app软件开发 >> IOS开发 >> 手动导入xmpp后,再使用cocoapods的时候出现的问题

手动导入xmpp后,再使用cocoapods的时候出现的问题

作者:佚名      IOS开发编辑:admin      更新时间:2022-07-23

最新的cocoapod导入xmpp的时候,会出现循环依赖,所以撸主选择了手动导入。

一开始还用的挺开心的,后来,使用cocoapods导入其他的框架,发现调用的时候总是报错。

Undefined symbols for architecture x86_64:

  "_OBJC_CLASS_$_SVPRogressHUD", referenced from:

      objc-class-ref in HJCXMPPTools.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

在网上搜索了一堆的攻略,cocoapods卸载重新按照了108遍,然而这并没有什么卵用。

后来我再次用cocoapod更新框架的时候,发现终端的一段警告

[!] 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.

 

这下有了思路了,原来我手动导入xmpp的时候,修改了Other Linker Flags

 

所以解决办法就是:

按照提示,增加$(inherited)

 

添加之后,问题终于解决,撸主潸然泪下,困扰撸主2天的问题终于解决鸟~~。