Xcode中用到QQ分享功能报错l_OBJC_PROTOCOL_$_TencentApiInterfaceDelegate

问题:

导入或更新TencentOpenApi运行报错Undefined symbols for architecture arm64:
"l_OBJC_PROTOCOL_$_TencentApiInterfaceDelegate", 
referenced from:l_OBJC_CLASS_PROTOCOLS_$_AppDelegate in AppDelegate.o

(1)打开文件 AppDelegate.mm
发现提示

Cannot find protocol definition for 'TencentSessionDelegate'

在大型的工程项目当中,还是不要忽略警告⚠️内容
Xcode中用到QQ分享功能报错l_OBJC_PROTOCOL_$_TencentApiInterfaceDelegate_第1张图片
(2)进入 TencentSessionDelegate.m
发现包含协议

@protocol TencentSessionDelegate
@optional

将TencentApiInterfaceDelegate 替换为 QQApiInterfaceDelegate
在文件开头 加上 #import “QQApiInterface.h”

在运行就可以啦(其他地方的工程文件,直接替换TencentSessionDelegate.m )
方法链接
感恩博主

你可能感兴趣的:(IOS开发)