Upgrade Xcode 7.0 Bata today to discover network access failures.
Output error message
The
resource could not being loaded because the APP Transport Security policy requires the use of a secure connection.
After Google verified, IOS9 introduced the new feature app Transport Security (ATS). Details: App Transport Security (ATS)
The new feature requires that the network access within the app must use the HTTPS protocol.
But now the company's project is using the HTTP protocol, using private encryption to ensure data security. It is not immediately possible to change to HTTPS protocol transfer.
Finally, the following solutions are found:
- Add the Nsapptransportsecurity type dictionary in Info.plist.
- Add Nsallowsarbitraryloads type Boolean under Nsapptransportsecurity with the value set to Yes
Reference:
- APP Transport Security Support aka Apps on IOS 9 don ' t work #4560
- 711_networking_with_nsurlsession.pdf
Summarize:
Apple is stepping up its security controls, a move that shows Apple's focus on information security, and the fact that most applications transmit data unencrypted or privately encrypted, so that Apple begins to demand it from developers.
Although private encryption is somewhat secure, it is not a permanent one. With so many security experts around the world maintaining HTTPS security, using HTTPS early to ensure information security is the King! Also eliminates the security hidden danger of the private encryption protocol!
IOS9 workaround for HTTP not working properly