How to handle "CFNetwork SSLHandshake failed" in iOS

Several times I get CFNetwork SSLHandshake failed -(9806) in my code, but I'm not sure why this is happening, since my code works smoothly, except when I run it on iOS 6 and then on iOS 7 64- bit I get this warning.
Can someone suggest me how to deal with this problem?

+43
ios nsurlconnection cfnetwork
Nov 12 '13 at 6:51
source share
5 answers

Usually when I get CFNetwork SSLHandshake failed -(*) Its because of my local Wi-Fi network (the device is connected to the network, but not the Internet)

Try again on a different network (3G is the fastest solution for me)

+41
Nov 26 '13 at 10:32
source share

This may also happen due to iOS 9. iOS 9 and OSX 10.11 require TLSv1.2 SSL for all hosts on which you plan to request data if you do not specify exception domains in your application's Info.plist file.

You can find more information here: https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/

Or Stephen Peterson will answer here, which is very clear: https://stackoverflow.com/a/316618/

+11
Sep 24 '15 at 12:23
source share

Had the same problem, and after I confirmed that the server is receiving POST, this solution was as follows:

  • Clear project: Product → Clear
  • Remove the application from the iOS / iOS Simulator device and exit Simulator
  • Compile the application and run it

In my case, just like that.

+6
Aug 27 '15 at 9:45
source share

I had the same problem, and in my case, the solution was that in my code I wrote

 initWithScheme:@"https" 

instead

 initWithScheme:@"http" 

So make sure you use the correct protocol

+1
Mar 09 '14 at 2:03
source share

Another solution: check if the date / time on the phone is set correctly. SSL certificates are valid until a certain date.

https://superuser.com/a/760211

-2
Nov 30 '16 at 12:00
source share



All Articles