I am testing my app in Xcode 7, IOS 9 and got the following error :
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
So I have done some changes in Info.plist file as below and application is now working fine across all IOS Versions:
<key>NSAppTransportSecurity</key><dict>
<key>NSExceptionDomains</key><dict><key>myserver.com</key><dict>
<key>NSIncludesSubdomains</key><false/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/></dict> </dict></dict>
So my doubt is whether this remains a permanent fix or whether I should use NSURLSession in my code.
Thanks, Abin
Adding the following to your Info.plist will disable ATS
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
</dict>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With