IOS9 request https problems-record, ios9 request https record

Source: Internet
Author: User

IOS9 request https problems-record, ios9 request https record

When iOS9 started, Apple changed all HTTP to HTTPS, so the network request failed. solution:

1. Change to HTTP:

Add a Key: NSAppTransportSecurity (Dictionary type) to the info. plist file, and then add a Key: NSAllowsArbitraryLoads (Boolean Type) to it. The attribute value is set to YES. For example:
      
2. Add a whitelist

(This is mainly for running program printing'-CanOpenURL: failed for URL: "XXX"-error: "This app is not allowed to query for scheme XXX"'Problem) (take umeng as an example)

Open the info. plist file in the Source Code method, add Code similar to the following in it (General official website can find the solution, http://dev.umeng.com/social/ios/ios9)

<key>LSApplicationQueriesSchemes</key>    <array>        <string>wechat</string>        <string>weixin</string>        <string>sinaweibohd</string>        <string>sinaweibo</string>        <string>sinaweibosso</string>        <string>weibosdk</string>        <string>weibosdk2.5</string>    </array>

3. Run the program and the print information will change'-CanOpenURL: failed for URL: "XXX"-error: "null"', This print seems to be unable to be eliminated (I have not found a solution, but it will not appear in the real machine)

This is OK.

 

Add link for iOS9 adaptation issues: http://www.cocoachina.com/ios/20150702/12384.html

Related Article

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.