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:
-
Add a type in NSAppTransportSecurity info.plist Dictionary .
-
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