Today's upgrade Xcode 7.0 bata found that network access failed.
Output error message
use of a secure connection.
After Google verified, IOS9 introduced new features App Transport Security (ATS) . Details: App Transport Security (ATS)
The new feature requires that the network access within the app must use HTTPS protocols.
But now the company's projects are using HTTP protocols that use private encryption to keep data secure. It is not immediately possible to change the HTTPS protocol transfer.
Finally, the following solutions are found:
-
Add a type in NSAppTransportSecurity info.plist Dictionary .
-
NSAppTransportSecurityunder Add NSAllowsArbitraryLoads type, the Boolean value is set toYES
See a lot of students after the modification or can not be added:
-
Search in Filter Info.plist , select Info.plist to edit
-
According to the above-mentioned way to add information, the correct changes will see this look, note the type NSAppTransportSecurity Dictionary , NSAllowsArbitraryLoads for Boolean , copy and paste, do not have more space, segment fault page directly copied, often more one out of space!
-
Note that there is also a unit test below Info.plist , it is not useful to modify that file!
IOS9 workaround for HTTP not working properly