URL scheme
在iOS9中,如果使用URL scheme必須在"Info.plist"中將你要在外部調用的URL scheme列為白名單,否則不能使用。key叫做LSApplicationQueriesSchemes ,鍵值內(nèi)容是
1 | LSApplicationQueriesSchemes urlscheme urlscheme2 urlscheme3 urlscheme4 |
-canOpenURL: failed for URL: "weichat://" - error: "This app is not allowed to query for scheme weichat"
推薦一篇博客: http://awkwardhare.com/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. |
聯(lián)系客服