I installed Xcode 7 and tried running my app under iOS 9.
I'm getting the infamous error: Connection failed! Error - -1200 An SSL error has occurred and a secure connection to the server cannot be made.
The thing is my server DOES support TLSv1.2 and I'm using NSURLSession
.
What could be the problem then?
For me proxy was blocking try to use internet from different source will resolve issue. Wifi, Lan, etc.
With iOS9, I had a same issue: while SSLlab result showed no issues with protocols / ciphers on my server, a connection to one specific URL failed on an iPad running iOS/9.3.5 with an SSL-Error:
My stupid mistake was, that I had a redirect, i.e. in NGINX (and similar in Apache):
If the user accessed
/calender
by setting:the server redirected to another domain breaking the establishment of the SSL-connection.
Setting the redirect as follows fixed it:
In iOS9, Apple added new feature called App Transport Security(ATS).
ATS enforces best practices during network calls, including the use of HTTPS.
Apple Pre-release documentation:
Add Below key in your info.plist & then see.
Even you can add specific exception,
Check out this doc that apple provided.
I had a similar issue at runtime on iOS 9 and what I did to fix it was added the
NSAppTransportSecurity
Dictionary to myinfo.plist
file with theNSAllowsArbitraryLoads
Bool
set totrue
and after cleaning and rebuilding it worked.I hope this helps!
Apple has released the full requirements list for the App Transport Security.
Turned out that we were working with TLS v1.2 but were missing some of the other requirements.
Here's the full check list:
The accepted ciphers are: