POST request error: NSURLConnection HTTP load failed iOS 10

user-unknown picture user-unknown · Dec 29, 2016 · Viewed 8.2k times · Source

I'm new to iOS programming. I want to connect my app to my web service (HTTPS).

Why is XCode telling me this error when I run POST request with 'Alamofire 4.0' in iOS 10?

enter image description here

This error doesn't appear when I use iOS 9 simulator. I've tried various ways as people say on stackoverflow and none of them solved my problem.

Update:

I have added this inside my info.plist, and still get the same error.

enter image description here

How to implement ATS in iOS 10?

Thanks in advance.

Answer

user-unknown picture user-unknown · Jan 11, 2017

In my case, I changed the SSL certificate on my API domain with the trusted one as mentioned by Apple in this link.