最近发现线上APP的分享功能有些问题,查看一下发现友盟分享SDK版本太久了,一直没有更新。所以这次更新了一下。因为之前版本是4.xx的,目前版本6.xx,所以需要完全移除之前的所有配置重新集成最新的SDK。但是集成之后出现了20个报错。在网上查了一下发现没有靠谱的解决方法。所以记录一下。
//20个错误如下:
Undefined symbols for architecture arm64:
"_UMShareToQQ", referenced from:
+[UMSocialQQHandler setQQWithAppId:appKey:url:] in libSocialQQ.a(UMSocialQQHandler.o)
-[UMSocialQQHandler getQQPlatform] in libSocialQQ.a(UMSocialQQHandler.o)
___34-[UMSocialQQHandler getQQPlatform]_block_invoke in libSocialQQ.a(UMSocialQQHandler.o)
-[UMSocialQQHandler handleQQSendObject:snsName:] in libSocialQQ.a(UMSocialQQHandler.o)
"_UMShareToQzone", referenced from:
+[UMSocialQQHandler setQQWithAppId:appKey:url:] in libSocialQQ.a(UMSocialQQHandler.o)
-[UMSocialQQHandler shareToQzoneWithAppId:url:] in libSocialQQ.a(UMSocialQQHandler.o)
___47-[UMSocialQQHandler shareToQzoneWithAppId:url:]_block_invoke in libSocialQQ.a(UMSocialQQHandler.o)
-[UMSocialQQHandler qzoneAppId] in libSocialQQ.a(UMSocialQQHandler.o)
-[UMSocialQQHandler clickHandlerWithSnsName:controller:socialControllerService:] in libSocialQQ.a(UMSocialQQHandler.o)
-[UMSocialQQHandler handleQQSendObject:snsName:] in libSocialQQ.a(UMSocialQQHandler.o)
___36-[UMSocialQQHandler tencentDidLogin]_block_invoke in libSocialQQ.a(UMSocialQQHandler.o)
...
"_OBJC_CLASS_$_UMSocialData", referenced from:
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMUtils", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialiToast", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialHttpClient", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
"_OBJC_CLASS_$_UMSocialSnsPlatform", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialConfigInternal", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialAccountManager", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialOpAnalytics", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
"_OBJC_CLASS_$_UMSocialSnsHandler", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialSnsPlatformManager", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialHTTPRequestOperation", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
"_UMShareToWechatSession", referenced from:
+[UMSocialWechatHandler setWXAppId:appSecret:url:] in libSocialWechat.a(UMSocialWechatHandler.o)
-[UMSocialWechatHandler getWechatPlatform:] in libSocialWechat.a(UMSocialWechatHandler.o)
___43-[UMSocialWechatHandler getWechatPlatform:]_block_invoke136 in libSocialWechat.a(UMSocialWechatHandler.o)
-[UMSocialWechatHandler clickHandlerWithSnsName:controller:socialControllerService:] in libSocialWechat.a(UMSocialWechatHandler.o)
"_OBJC_CLASS_$_UMSocialResponseEntity", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialAccountEntity", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_OBJC_CLASS_$_UMSocialConfig", referenced from:
objc-class-ref in libSocialWechat.a(UMSocialWechatHandler.o)
objc-class-ref in libSocialQQ.a(UMSocialQQHandler.o)
"_UMShareToWechatTimeline", referenced from:
+[UMSocialWechatHandler setWXAppId:appSecret:url:] in libSocialWechat.a(UMSocialWechatHandler.o)
-[UMSocialWechatHandler getWechatPlatform:] in libSocialWechat.a(UMSocialWechatHandler.o)
___43-[UMSocialWechatHandler getWechatPlatform:]_block_invoke159 in libSocialWechat.a(UMSocialWechatHandler.o)
-[UMSocialWechatHandler clickHandlerWithSnsName:controller:socialControllerService:] in libSocialWechat.a(UMSocialWechatHandler.o)
"_UMShareToWechatFavorite", referenced from:
+[UMSocialWechatHandler setWXAppId:appSecret:url:] in libSocialWechat.a(UMSocialWechatHandler.o)
-[UMSocialWechatHandler getWechatPlatform:] in libSocialWechat.a(UMSocialWechatHandler.o)
-[UMSocialWechatHandler clickHandlerWithSnsName:controller:socialControllerService:] in libSocialWechat.a(UMSocialWechatHandler.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
主要原因:
重复添加腾讯openAPI
libSocialQQ.a
libSocialWechat.a
删除重复的腾讯openAPI即可解决。