收藏
回答

部分用户分享内容跳转至微信之后出现 "正在连接" 字样后又跳回了 iOS APP,如何解决?

当前 iOS APP 接入的是 2.0.2 的 xcframework 形式的 SDK

由于只是部分用户出现没有办法分享的问题,而且根据日志回捞的结果来说 sdk 的 WXApi 的 send 的 callback 的结果是 success,但跳转到微信后整个分享的流程却没有走下去,以下是部分出问题的用户的分享日志,希望得到相关支持.

[WeChatIdentityHandler.mm]-[WeChatIdentityHandler setContextReq:contextId:]WXLog:req:<SendMessageToWXReq: 0x283f75200>, cid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[WXApi.m]+[WXApi handleOpenURL:delegate:]WXLog:Error:handle open url fail, url is nil
[WXApi.m]+[WXApi launchApplicationWithUrl:completion:]_block_invokeWXLog:launch app with ul only success
[WXApi.m]+[WXApi launchWechatWithExtralUrl:forceScheme:contextId:paramsDataStr:unnecessaryDataErased:completion:]_block_invokeWXLog:launch app with universal link, ret:1
[WeChatIdentityHandler.mm]+[WeChatIdentityHandler loadTokenFromKeychain]WXLog:Error:fail to load Keychain status:-25300, keyData null:1
[WeChatIdentityHandler.mm]+[WeChatIdentityHandler loadTokenFromKeychain]WXLog:token[(null)] is null
[WeChatShareUrlCheckHandler.m]+[WeChatShareUrlCheckHandler startCheckWithShareUrlCheckTask:]WXLog:[checkUrl] not in list, try request async
[WeChatShareUrlCheckHandler.m]-[WeChatShareUrlCheckTask continueShareTask]WXLog:continue share, appid=xxxxxxxxxxx, url=https://m.example.com/agent/?agentId=71539264797290496
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:gen url with full params ok
[WeChatShareUrlCheckHandler.m]-[WechatShareUrlCheckConfigRecord initWithParamDictionary:]WXLog:[checkUrl] init record with dict: {
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req[<SendMessageToWXReq: 0x283f75200>], appID:xxxxxxxxxxx, universalLink:https://example.com/, sdkVersion:2.0.2
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req transformToUrl data len:13564, erased:0
[WeChatIdentityHandler.mm]-[WeChatIdentityHandler setContextReq:contextId:]WXLog:req:<SendMessageToWXReq: 0x283f7f800>, cid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[WXApi.m]+[WXApi handleOpenURL:delegate:]WXLog:Error:handle open url fail, url is nil
[WXApi.m]+[WXApi launchApplicationWithUrl:completion:]_block_invokeWXLog:launch app with ul only success
[WXApi.m]+[WXApi launchWechatWithExtralUrl:forceScheme:contextId:paramsDataStr:unnecessaryDataErased:completion:]_block_invokeWXLog:launch app with universal link, ret:1
[WeChatIdentityHandler.mm]+[WeChatIdentityHandler loadTokenFromKeychain]WXLog:Error:fail to load Keychain status:-25300, keyData null:1
[WeChatIdentityHandler.mm]+[WeChatIdentityHandler loadTokenFromKeychain]WXLog:token[(null)] is null
[WeChatShareUrlCheckHandler.m]+[WeChatShareUrlCheckHandler startCheckWithShareUrlCheckTask:]WXLog:[checkUrl] not in list, try request async
[WeChatShareUrlCheckHandler.m]-[WeChatShareUrlCheckTask continueShareTask]WXLog:continue share, appid=xxxxxxxxxxx, url=https://m.example.com/share-url-sample
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:gen url with full params ok
[WeChatShareUrlCheckHandler.m]-[WechatShareUrlCheckConfigRecord initWithParamDictionary:]WXLog:[checkUrl] init record with dict: {
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req[<SendMessageToWXReq: 0x283f7f800>], appID:xxxxxxxxxxx, universalLink:https://example.com/, sdkVersion:2.0.2
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req transformToUrl data len:13564, erased:0
[WXApi.m]+[WXApi handleOpenURL:delegate:]WXLog:Error:handle open url fail, url is nil
[WXApi.m]+[WXApi handleOpenURL:delegate:]WXLog:Error:handle open url fail, url is nil
[WeChatShareUrlCheckHandler.m]-[WechatShareUrlCheckConfigRecord initWithParamDictionary:]WXLog:[checkUrl] init record with dict: {
[WeChatShareUrlCheckHandler.m]-[WeChatShareUrlCheckTask isRecordValid:]WXLog:[checkUrl] record valid
[WeChatIdentityHandler.mm]-[WeChatIdentityHandler setContextReq:contextId:]WXLog:req:<SendMessageToWXReq: 0x283fa7a80>, cid:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[WeChatShareUrlCheckHandler.m]+[WeChatShareUrlCheckHandler requestURLRuleWithTask:isAsync:]_block_invoke_2WXLog:[checkUrl] get dict from resp, dict: {
[WXApi.m]+[WXApi launchApplicationWithUrl:completion:]_block_invokeWXLog:launch app with ul only success
[WXApi.m]+[WXApi launchWechatWithExtralUrl:forceScheme:contextId:paramsDataStr:unnecessaryDataErased:completion:]_block_invokeWXLog:launch app with universal link, ret:1
[WeChatIdentityHandler.mm]+[WeChatIdentityHandler loadTokenFromKeychain]WXLog:Error:fail to load Keychain status:-25300, keyData null:1
[WeChatIdentityHandler.mm]+[WeChatIdentityHandler loadTokenFromKeychain]WXLog:token[(null)] is null
[WeChatShareUrlCheckHandler.m]+[WeChatShareUrlCheckHandler startCheckWithShareUrlCheckTask:]WXLog:[checkUrl]no local data, try request async
[WeChatShareUrlCheckHandler.m]-[WeChatShareUrlCheckTask continueShareTask]WXLog:continue share, appid=xxxxxxxxxxx, url=https://m.example.com/call-app/
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req transformToUrl data len:7460, erased:0
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:gen url with full params ok
[WXApi.m]+[WXApi registerApp:universalLink:]WXLog:using sdk:xcframework-iphone-arm64
[WXApi.m]+[WXApi sendReq:isAutoResend:forceScheme:completion:]WXLog:send req[<SendMessageToWXReq: 0x283fa7a80>], appID:xxxxxxxxxxx, universalLink:https://example.com/, sdkVersion:2.0.2
回答关注问题邀请回答
收藏

2 个回答

  • 秋水
    秋水
    10-10

    我今天也遇到了问题,在社区论坛搜了类似问题都没有收获,就在绝望之际 看到了这个

    官方升级的 ReadMe文件

    SDK1.9.9

    1. 授权登录支持关闭自动授权

    2. 分享支持添加签名,防止篡改

    因 查看日志发现,其实返回了 code 但是 微信唤起的时候 一闪而过,有返回code 但是和前些年接入的时候交互不同,于是就在代码搜索 自动 搜到了这个:

    /** 是否关闭自动授权
    
     * @note YES为关闭自动授权,每次登陆都需要用户手动授权;NO为允许自动授权
    
     */
    
    @property (nonatomic, assign) BOOL nonautomatic;
    


    于是思考 是否是因为 默认启动了 自动授权呢?于是登陆逻辑修改为

        //构造SendAuthReq结构体
    
        SendAuthReq* req =[[SendAuthReq alloc ] init ];
    
        req.scope = @"snsapi_userinfo";// 只能填 snsapi_userinfo
    
        req.state = @"snake"//此处需要填写自己的key
    
        req.nonautomatic = YES;//nonautomatic 属性来控制授权行为 可以这样设置为关闭自动授权
    
        //第三方向微信终端发送一个SendAuthReq消息结构
    
        [WXApi sendReq:req completion:nil];
    


    然后就看到了 选择 取消、拒绝,登陆按钮的页面了!!!


    很奇怪,微信这么大的改动,接入文档里居然没有提及,让我耗费了几个小时一直以为是自己哪里接入错误了

    10-10
    有用
    回复
  • SteinX
    SteinX
    04-23

    在有问题的设备上也尝试了自检函数,并没有出现问题

    04-23
    有用
    回复 2
    • 剁椒鱼尾
      剁椒鱼尾
      05-07
      请问有结论了么
      05-07
      回复
    • 猫南北
      猫南北
      05-15
      有结果吗,怎么处理的,我这边也有这个问题
      05-15
      回复
登录 后发表内容