iOS应用之间跳转 报错:"This app is not allowed to query for scheme ***"
2016-11-23 11:14
597 查看
Mark:
关于应用之间跳转,核心代码是:[[UIApplication sharedApplication] openURL:url]
但是在试图打开这个url之前,应该先判断一下设备上是否安装了该url对应的APP,如果存在,打开APP,如果不存在,则做出相应处理:
BOOL isExist = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"iosamap://"]]
Question:
问题是 这个方法出现的如下错误:-canOpenURL: failed for URL: "iosamap://" - error: "This app is not allowed to query for scheme iosamap"
根据错误日志,我们且翻译成:当前APP不被允许调用iosamap这个scheme
Solution:
所以我们引入 白名单 的概念,在项目的info.plist文件中,添加scheme白名单:好了,问题解决
相关文章推荐
- iOS开发-canOpenURL: failed for URL: "mqq://" - error: "This app is not allowed to query for scheme mqq
- 【iOS开发】-canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- iOS分享授权问题:-canOpenURL: failed ..."This app is not allowed to query for sscheme xx
- iOS社会化分享报错:- error: "This app is not allowed to query for scheme mqq"
- iOS9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"key>
- iOS 9 failed for URL: "XXX://@" - error: "This app is not allowed to query for scheme XXX" iOS 从APP里
- Ios9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- Ios9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- Ios9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- [iOS]canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- iOS 9 failed for URL: "XXX://@" - error: "This app is not allowed to query for scheme XXX" iOS 从APP里启动另一APP
- iOS9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- 社交分享:-canOpenURL: failed for URL: "weixin://app/*************/" - error: "This app is not allowed to query for scheme weixin"
- ios 9.1之后 微信第三方登陆“This app is not allowed to query for scheme weixin”问题
- -canOpenURL: failed for URL: "kindle://home" - error: "This app is not allowed to query for scheme k
- "This app is not allowed to query for scheme ***"
- -canOpenURL: failed for URL: "wechat://" - error: "This app is not allowed to query for scheme wech
- -canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"