Hi everyone 👋
I’m running into a persistent SSL issue on iOS where the app fails to establish a secure HTTPS connection to our backend APIs. The same endpoints work fine on Android and web, but on iOS the requests fail with:
Error Domain=NSURLErrorDomain Code=-1200
"An SSL error has occurred and a secure connection to the server cannot be made."
UserInfo={
    NSLocalizedDescription = "An SSL error has occurred and a secure connection to the server cannot be made.";
    _kCFStreamErrorDomainKey = 3;
    _kCFStreamErrorCodeKey = -9802;
}
🔍 What I’ve Checked:
- The servers use valid, trusted SSL certificates from a public CA
- TLS 1.2 and 1.3 are enabled
- The intermediate certificates appear correctly configured (verified using SSL Labs)
- The issue happens on our customer's end. (Got it via Sentry)
Note: We recently removed NSAppTransportSecurity(NSAllowsArbitraryLoads) on our app, since all the endpoints use valid HTTPS certificates and standard configurations.
❓ Questions:
- Are there additional SSL validation checks performed by iOS when ATS is enabled?
- Has anyone seen similar behaviour, where valid certificate chains still trigger SSL errors?
Any insights or debugging suggestions would be greatly appreciated 🙏
As Albert suggested, I recommend that you isolate this in a small test project.  You can then experiment with adding and removing NSAllowsArbitraryLoads.  That’ll tell you whether ATS is a factor or not, and that’s always a good first step in situations like this.
That -9802 error is errSSLFatalAlert.  This is a common symptom of ATS problems because ATS simulates the TLS fatal alert on its failure path.  However, it’s not a definitive, because TLS fatal alerts can have other origins.
Finally, is your server available on the public Internet. If so, and you post the URL, I’d be happy to take a look.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
 
  
  
  
    
  
