Error : The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
How can I do? Please give me solution, Thanks.
Error : The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
How can I do? Please give me solution, Thanks.
From App Transport Security Technote
Default Behavior:
All connections using the NSURLConnection, CFURL, or NSURLSession APIs use App Transport Security default behavior in apps built for iOS 9.0 or later, and OS X 10.11 or later. Connections that do not follow the requirements will fail.
The solution is to up date the server to https TLS 1.2 and forward security. Also only supporting the encryption method in the above Security Technote.
Another solution is to whitelist the url on the app plist or even if necessary allow all http connections. This reduces the connection security, the best approach is to update the server.
Apple supplied information about this several places:
There was the WWDC 2015 session 706 that described as well as the release notes: What's New in iOS iOS 9.0. I believe it was also mentioned in the WWDC keynote.
Also see this SO Answer: About ATS SSL in iOS 9 release version.