美文网首页
xcode12 pod集成友盟报错 "_OBJC_CLASS_$

xcode12 pod集成友盟报错 "_OBJC_CLASS_$

作者: 大师的书 | 来源:发表于2020-10-15 15:00 被阅读0次

报错信息

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_UMSLEnvelopeBuild", referenced from:
      objc-class-ref in UMShare(UMCommonStatisticsManager.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

问题背景

公司要做第三方分享登陆,首先就想到友盟,于是按友盟官方的方法,在Podfile里写入

  pod 'UMCCommon' # 友盟基础库
  pod 'UMCShare/UI' # 友盟分享UI
  pod 'UMCShare/Social/WeChat' # 微信

结果发现报错,错误信息在下边。
经过种种搜索无果。回去看文档的时候突然发现友盟的库在2020.10.14更新了一版7.2.2版本。
UMSLEnvelopeBuild是基础库里的东西,抱着试一试的态度,我将基础库降低了一版,解决。在此记录一下分享给大家。猜测可能是没用xcode12做pod测试?🤔

如何解决

将友盟基础库降低一版即可,我使用的是7.1.3版本,将Podfile里友盟的基础库指定成7.1.3即可

  pod 'UMCCommon', '~> 7.1.3' # 友盟基础库
  pod 'UMCShare/UI' # 友盟分享UI
  pod 'UMCShare/Social/WeChat' # 微信

相关文章

网友评论

      本文标题:xcode12 pod集成友盟报错 "_OBJC_CLASS_$

      本文链接:https://www.haomeiwen.com/subject/krtopktx.html