iOS QQ SDK升级填坑

本文档介绍了在从V3.3.9升级到V3.5.5,以及进一步升级到V3.5.7过程中遇到的TencentOpenAPI编译错误,包括'TencentAuthorizeState'等重定义问题。解决方案包括导入头文件的修改和[TencentOAuth setIsUserAgreedAuthorization:YES]的添加,确保项目能够顺利编译通过。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、V3.3.9 -> V3.5.5

0. 备份 TencentOpenAPI.framework of V3.3.9

1. 覆盖 TencentOpenAPI.framework
Q: TencentOAuth.h编译错误
    Redefinition of 'TencentAuthorizeState'
    Redefinition of enumerator 'kTencentNotAuthorizeState'
    Redefinition of enumerator 'kTencentSSOAuthorizeState'
    Redefinition of enumerator 'kTencentWebviewAuthorzieState'
    
    Redefinition of 'TencentAuthMode'
    Redefinition of enumerator 'kAuthModeClientSideToken'
    Redefinition of enumerator 'kAuthModeServerSideCode'
    
    Duplicate interface definition for class 'TencentOAuth'
    
    # 所有@property提示
    Property has a previous declaration 
A: 
#import <TencentOpenAPI/TencentOAuth.h>
替换为(具体路径取决于你的工程)
#import "qq/TencentOpenAPI.framework/Headers/TencentOAuth.h"
即可编译通过

原来的
#import <TencentOpenAPI/QQApiInterface.h>
#import <TencentOpenAPI/QQApiInterfaceObject.h>
不用改或注释掉

2、V3.5.5 -> V3.5.7

0. 备份 TencentOpenAPI.framework of V3.5.5

1. 覆盖  TencentOpenAPI.framework

2. 增加语句(在initWithAppId后) [TencentOAuth setIsUserAgreedAuthorization:YES];

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值