CFNetwork SSLHandshake failed -- info.plist changes don't help

I have reviewed a ton of posts (e.g. https://forums.developer.apple.com/message/5522#5522 as one example) and have implemented the suggestions regarding modifications to info.plist for a workaround but my ios code still fails connecting to my API.


My api is hosted on my domain (on a shared server), and I have purchased and had installed SSL certificate to allow me to call the API from IOS XCode 7.1.1.


After paying for the installation of the cert, I discovered that the hosting company does not support anything beyond TLS 1.0 on the shared servers. The only option would be to upgrade to a virtual private server and do all the configuration myself (and this is a very low-activity iphone app I'm working with, just for friends really, so that's a bit of overkill).


Per recommendations, I have modified my info.plist to have:


<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

<key>NSExceptionDomains</key>

<dict>

<key>MYDOMAIN.COM</key>

<dict>

<key>NSIncludesSubdomains</key>

<true/>

<key>NSTemporaryExceptionAllowsInsecureHttpLoads</key>

<true/>

<key>NSTemporaryExceptionMinimumTLSVersion</key>

<string>1.0</string>

<key>NSTemporaryExceptionRequiresForwardSecrecy</key>

<false/>

</dict>

</dict>

</dict>

Although I've seen reports from people that this "did the trick", I'm getting absolutely no joy. I've now "progressed" ? from a 9824 error to a 9801 SSLHandshake error, now saying Http load failed kCFStreamErrorDomainSSL -9801. But still no closer to a solution.


First: Any other suggestions why this info.plist workaround isn't working for me?


Second: Any suggestions on hosting solutions for a simple API with a low-traffic database back end that can be readily used for API support of a swift 2 ios application? Surely there are other folks out there attempting to provide a data backend for their low-traffic non-commercial iphone app? It just seems like overkill that I have to move to a virtual server that I configure entirely to support 5-10 users accessing a database of less than 100 rows.


Thanks in advance for your assistance.

If you are just storing and retrieving data, have you considered CloudKit? The forum won't let me post a direct link to the Quick Start guide (probably due to the low-budget spam filtering seeing the number sign and a string of numbers in the link), so go here:

https://developer.apple.com/library/ios/navigation/

and type "CloudKit" in the search box next to Documents. Choose "CloudKit Quick Start" in the results.

This page shows what you get for free (I think you need a paid developer account though):

https://developer.apple.com/icloud/


Also, Parse was / is popular, but that is going open source / self hosted now.

I'm having the same issue and have posted another thread asking this.


https://forums.developer.apple.com/thread/43503


I even tried disabling App Transport Security completely with allowing arbitary loads (a key in plist) but was still getting the issue! Did you figure out a solution?

Update: I fixed this with my problem (symptoms sounded similar to yours), my server was serving up without the intermediate certificate hence the handshake was failing! Maybe you were having the same issue?

See: https://forums.developer.apple.com/thread/43503

CFNetwork SSLHandshake failed -- info.plist changes don't help
 
 
Q