IOS9 Workaround for Unreachable network

Source: Internet
Author: User

The first two days of upgrading the Xcode7.0, found using the simulator to run some network access to the project will be error, as follows:

The resource could not being loaded because the APP Transport Security policy requires the use of a secure connection.

The reasons are as follows:

Xcode7.0 requires that the network access within the app must use the HTTPS protocol, which is currently using the HTTP protocol.

The solution found later on the web is this:

    1. Add a type in NSAppTransportSecurity info.plist Dictionary .

    2. NSAppTransportSecurityunder Add NSAllowsArbitraryLoads type, the Boolean value is set toYES。

The implementation method is as follows:

1. Locate the Info.plist file in the project directory and open

  

2. Click "+" in the open Info.plist file to add a new dictionary and name it nsapptransportsecurity

  

3. Open nsapptransportsecurity and add NSAllowsArbitraryLoads type Boolean with value set toYES

  

After completing these three steps back to the project, the network will be able to access the normal.

IOS9 Workaround for Unreachable network

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.