分享

iOS 9 canOpenURL openURL...

 wintelsui 2015-09-13

URL scheme

在iOS9中,如果使用URL scheme必须在"Info.plist"中将你要在外部调用的URL scheme列为白名单,否则不能使用。key叫做LSApplicationQueriesSchemes ,键值内容是

1
LSApplicationQueriesSchemes urlscheme urlscheme2 urlscheme3 urlscheme4

-canOpenURL: failed for URL: "weichat://" - error: "This app is not allowed to query for scheme weichat"



推荐一篇博客: http:///post/121196006730/quick-take-on-ios-9-url-scheme-changes

其中最关键的是以下部分:

1
2
If you call the “canOpenURL” method on a URL that is not in your whitelist, 
it will return “NO”, even if there is an app installed that has registered
to handle this scheme. A “This app is not allowed to query for scheme xxx” 
syslog entry will appear.
If you call the “openURL” method on a URL that is not in your whitelist, 
it will fail silently. A “This app is not allowed to query for scheme xxx” 
syslog entry will appear.

 



 
  

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多