QQ分享出现,安全校验不通过

2021-08-19  本文已影响0人  野咪咕

老项目直接 接入的 QQ互联SDK 

官网地址 https://connect.qq.com

TencentOpenAPI.framework

TencentOpenApi_IOS_Bundle.bundle

下载SDK 导入项目

//出现问题是 UniversalLink 回调问题,重写这个方法- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler

#pragma mark -- UniversalLink回调

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {

    // Demo处理手Q UniversalLink回调的示例代码

    if([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {

        NSURL *url = userActivity.webpageURL;

        if(url && [TencentOAuth CanHandleUniversalLink:url]) {

  //QQ分享 

            [QQApiInterface handleOpenUniversallink:url delegate:self];

            return [TencentOAuth HandleUniversalLink:url];

        }else {

       //微信

            return [WXApi handleOpenUniversalLink:userActivity delegate:self];

        }

    }

    

    return YES;

}

上一篇下一篇

猜你喜欢

热点阅读