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. |
|