我按照微信官方文档(https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html) 接入IOS登录
问题:报错出现很多libWeChatSDK.a 文件中的 Undefined symbols 该如何解决?
错误信息:
"_OBJC_CLASS_$_UIPasteboard", referenced from:
objc-class-ref in libWeChatSDK.a(AppCommunicate.o)
"_OBJC_CLASS_$_UIDevice", referenced from:
objc-class-ref in libWeChatSDK.a(WeChatApiUtil.o)
"_OBJC_CLASS_$_UIScreen", referenced from:
objc-class-ref in AppDelegate.o
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)
objc-class-ref in libWeChatSDK.a(WeChatApiUtil.o)
"_OBJC_CLASS_$_UIApplication", referenced from:
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)
objc-class-ref in libWeChatSDK.a(WeChatApiUtil.o)
objc-class-ref in libWeChatSDK.a(WXApi.o)
"_UIImageJPEGRepresentation", referenced from:
-[WXMediaMessage setThumbImage:] in libWeChatSDK.a(WXApiObject.o)
"_OBJC_CLASS_$_UINavigationController", referenced from:
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)
"_OBJC_CLASS_$_UIWindow", referenced from:
objc-class-ref in AppDelegate.o
"_OBJC_CLASS_$_UIBarButtonItem", referenced from:
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)
"_OBJC_METACLASS_$_UIViewController", referenced from:
_OBJC_METACLASS_$_WXWebViewController in libWeChatSDK.a(WapAuthHandler.o)
"_OBJC_CLASS_$_UIImage", referenced from:
objc-class-ref in libWeChatSDK.a(WechatAuthSDK.o)
objc-class-ref in libWeChatSDK.a(AppCommunicateData.o)
"_UIApplicationOpenURLOptionUniversalLinksOnly", referenced from:
+[WXApi launchApplicationWithUrl:completion:] in libWeChatSDK.a(WXApi.o)
"_OBJC_CLASS_$_UIAlertAction", referenced from:
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)
"_OBJC_CLASS_$_UIAlertController", referenced from:
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)
"_OBJC_CLASS_$_UIResponder", referenced from:
_OBJC_CLASS_$_AppDelegate in AppDelegate.o
"_OBJC_CLASS_$_UIViewController", referenced from:
_OBJC_CLASS_$_WXWebViewController in libWeChatSDK.a(WapAuthHandler.o)
"_OBJC_METACLASS_$_UIResponder", referenced from:
_OBJC_METACLASS_$_AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture arm64
ViewController", referenced from:\
_OBJC_METACLASS_$_WXWebViewController in libWeChatSDK.a(WapAuthHandler.o)\
"_OBJC_CLASS_$_UIImage", referenced from:\
objc-class-ref in libWeChatSDK.a(WechatAuthSDK.o)\
objc-class-ref in libWeChatSDK.a(AppCommunicateData.o)\
"_UIApplicationOpenURLOptionUniversalLinksOnly", referenced from:\
+[WXApi launchApplicationWithUrl:completion:] in libWeChatSDK.a(WXApi.o)\
"_OBJC_CLASS_$_UIAlertAction", referenced from:\
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)\
"_OBJC_CLASS_$_UIAlertController", referenced from:\
objc-class-ref in libWeChatSDK.a(WapAuthHandler.o)\
"_OBJC_CLASS_$_UIResponder", referenced from:\
_OBJC_CLASS_$_AppDelegate in AppDelegate.o\
"_OBJC_CLASS_$_UIViewController", referenced from:\
_OBJC_CLASS_$_WXWebViewController in libWeChatSDK.a(WapAuthHandler.o)\
"_OBJC_METACLASS_$_UIResponder", referenced from:\
_OBJC_METACLASS_$_AppDelegate in AppDelegate.o\
ld: symbol(s) not found for architecture arm64\
}
如下图:
接入版本:1.8.7.1
xcode版本:11.5
Build Setting 部分设置:
Build Phases部分设置:
其他项均按文档设置
你好,是否有按文档要求链接库上加上了Webkit.framework
https://developers.weixin.qq.com/doc/oplatform/Mobile_App/Access_Guide/iOS.html
手动重新添加一下libWeChatSDK.a文件到项目中看看
求教o(╥﹏╥)o