Today's upgrade Xcode7.0, found that network access failed.
Output error message:The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
After Google verified, IOS9 introduced new features App Transport Security (ATS) . The new feature requires that the network access within the app must use HTTPS protocols: Network requests sent by the IOS9 system will be unified using TLS 1.2 SSL. With the TLS 1.2 protocol, the purpose is to enforce enhanced data access security, and related network requests under the System Foundation framework will no longer default to unsecured network protocols such as Http , and TLS 1.2 is used by default.
The server therefore needs to be updated to parse the relevant data. But now the company's projects use a HTTP protocol, using private encryption to ensure data security, and now can not immediately change to HTTPS protocol transmission. If not updated, you can reverse the unsecured network request by declaring it in Info.plist.
There are two types of solutions available:
Scenario One: Immediately let the company's server upgrade use TLS 1.2
Scenario Two: Although Apple does not recommend, but can be declared in the Info.plist, back to the insecure network request will still allow the app to access the specified HTTP, or even arbitrary HTTP,
1. Add the type in NSAppTransportSecurity info.plist Dictionary .
2. NSAppTransportSecurity under Add NSAllowsArbitraryLoads type Boolean , set value toYES
3.Clean up the cache
IOS9 Network adaptation