年年有"余"

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 3225|回复: 0

[项目经验] canOpenURL: failed for URL: "mqq://sdk"

[复制链接]
  • TA的每日心情

    2024-10-15 10:05
  • 签到天数: 372 天

    [LV.9]以坛为家II

    发表于 2015-10-23 09:44:42 | 显示全部楼层 |阅读模式
    [Objective-C] 纯文本查看 复制代码
    -canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "(null)"
    2015-09-13 15:51:10.903[2948:1118021] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "(null)"
    2015-09-13 15:51:10.904[2948:1118021] -canOpenURL: failed for URL: "mqqwpa://qzapp" - error: "(null)"
    2015-09-13 15:51:10.905[2948:1118021] -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV2"
    2015-09-13 15:51:10.906[2948:1118021] -canOpenURL: failed for URL: "mqqOpensdkSSoLogin://qqapp" - error: "This app is not allowed to query for scheme mqqOpensdkSSoLogin"
    2015-09-13 15:51:10.906[2948:1118021] -canOpenURL: failed for URL: "mqq://qqapp" - error: "This app is not allowed to query for scheme mqq"
    2015-09-13 15:51:10.907[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdkapiV2"
    2015-09-13 15:51:10.908[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdkapi19://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdkapi19"
    2015-09-13 15:51:10.909[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdkapi://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdkapi"
    2015-09-13 15:51:10.910[2948:1118021] -canOpenURL: failed for URL: "mqzoneopensdk://qzapp" - error: "This app is not allowed to query for scheme mqzoneopensdk"
    2015-09-13 15:51:10.911[2948:1118021] -canOpenURL: failed for URL: "mqzone://qzapp" - error: "This app is not allowed to query for scheme mqzone"
    2015-09-13 15:51:10.911[2948:1118021] -canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "(null)"
    2015-09-13 15:51:10.912[2948:1118021] -canOpenURL: failed for URL: "mqqopensdkapiV3://qzapp" - error: "(null)"

    现在app在ios9运行出现了这些,查了下资料。
    根据网上的做法。
    [Objective-C] 纯文本查看 复制代码
    iOS9 URL Schemes 
    除了要在项目info URL Types中设置URL Schemes,还需要在info.plist里面增加可信任的调用app,否则回报如下错误
    -canOpenURL: failed for URL: "weixin://app/wx9c8771d3c07dfd30/" - error: "This app is not allowed to query for scheme weixin"
    -canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "This app is not allowed to query for scheme wtloginmqq2"
    info.plist加入
    <key>LSApplicationQueriesSchemes</key>
    <array>
    <string>urlscheme</string>
    <string>urlscheme2</string>
    <string>urlscheme3</string>
    <string>urlscheme4</string>
    </array>
    本来加入之前提示:
    -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "This app is not allowed to query for scheme mqqopensdkapiV2"
    加入之后,error原因就没有了。如下:
    -canOpenURL: failed for URL: "mqqopensdkapiV2://qzapp" - error: "(null)"

    解决方案:使用真机测试,真机上安装了QQ会直接跳转到QQ进行第三方认证,模拟器上由于没有安装QQ无法跳转。但以前的方式是如果没有安装QQ会跳转到一个浏览器进行认证授权,现在不行了,等SDK升级吧。
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    手机版|小黑屋|Archiver|iOS开发笔记 ( 湘ICP备14010846号 )

    GMT+8, 2024-12-5 03:00 , Processed in 0.046413 second(s), 21 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表