IOS9 White list problem-canopenurl:failed for URL: "XX"-Error: "This app was not allowed to query for scheme XX"

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.