iOS9 getting error “an SSL error has occurred and a secure connection to the server cannot be made”

Nanda picture Nanda · Sep 24, 2015 · Viewed 148.7k times · Source

Since I upgraded my existing project with iOS 9, I keep getting the error :

An SSL error has occurred and a secure connection to the server cannot be made.

Answer

Tony TRAN picture Tony TRAN · Sep 24, 2015

For the iOS9, Apple made a radical decision with iOS 9, disabling all unsecured HTTP traffic from iOS apps, as a part of App Transport Security (ATS).

To simply disable ATS, you can follow this steps by open Info.plist, and add the following lines:

<key>NSAppTransportSecurity</key>
  <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
  </dict>