"iOS development"-canopenurl:failed for URL: "XX"-Error: "This app is not allowed to query for scheme XX"
Collection/bookmark/share for width under 768px
Console output
is the output of the console after I launch a Xcode 7 + IOS 9 App.
This is not the case in Xcode 6.4 + IOS 8 o'clock, because "in order to enforce enhanced data access security, iOS9 defaults to all nsurlconnection , cfurl , nsurlsession HTTP requests are changed to HTTPS requests: IOS9.X-SDK compile, the default is to let all the nsurlconnection, Cfurl , nsurlsession from the The HTTP request is unified with the TLS 1.2 (SSL 3.1) protocol. "
Here's the solution:
① If your output message is a-canopenurl:failed for URL: "Kindle://home"-Error: "The This app was not allowed to query for scheme Kindle"
Set Bitcode to NO
Go to the Enable Bitcode under the Build Settings in your target and set it to NO, which will not necessarily prevent your console from continuing to output this message, but it will ensure that your App works.
② If your output message is Xxxx-error: "The This app was not allowed to the query for scheme xxxx"
(here because my App integrates the functions of sharing to QQ, Weibo, xxxx Part I saw Mqq, WeChat, Sinaweibosso and many other information)
Info.plist
Go to info.plist inside to create a called Lsapplicationqueriesschemes Array, the XXXX part of the words you see in one fill in, until the console does not have any relevant output.
③ about other console error messages raised through WebView access to HTTP URLs
Setting ATS in Info.plist
<key>nsapptransportsecurity</key>
<dict>
<!--Include to allow all connections (DANGER)--
<key>nsallowsarbitraryloads</key>
<true/>
</dict>
As we said earlier, Apple wants us to access a relatively secure HTTPS, so when you need to access HTTP,
Although Apple does not recommend it, it is possible to reverse an unsecured network request by declaring the content shown in Info.plist, which still allows the APP to access the specified HTTP, or even arbitrary http.
IOS9 White list problem-canopenurl:failed for URL: "XX"-Error: "This app was not allowed to query for scheme XX"