iOS Question An SSL error has occured and a secure connection to the server cannot be made.

cwt

Active Member
Licensed User
Longtime User
After releasing a new version of my iOS app, running under Apple Testflight, my users are getting the below error message when they do anything in the app that connects them to my API server:

"An SSL error has occured and a secure connection to the server cannot be made."

Nothing on the server side related to this app has changed.

The previous release of this app was December 22nd and that worked fine. Nothing has been changed in the app other than the version number. The new version of the app was uploaded to Testflight only because of the 90 day expiration of Testflight apps.

Thanks for any help.
 

cwt

Active Member
Licensed User
Longtime User
Is the server running over SSL? With a valid certificate?

You can disable ATS
Yes - the server is running with a valid SSL certificate. The API server works fine with other apps and the previous version of this app. Nothing has changed on the server side. I can also connect to the server running this app through the B4i bridge with no problem. It appears only my users in the Testflight program are having the issue. Apple developer support is not much use on this.
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Also - all Android users of the app are not having any problems connecting to the API server - only iOS users are having the problem.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Also - all Android users of the app are not having any problems connecting to the API server - only iOS users are having the problem.
Question - did the SSL was updated recently? I had the same problem when I applied the wrong type SSL on my server.
Just in case - try to open the website from iOS browser.
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Question - did the SSL was updated recently? I had the same problem when I applied the wrong type SSL on my server.
Just in case - try to open the website from iOS browser.
The API server is not the web server so it cannot be opened with a browser. But, as I said, I can connect with the app running via the B4i bridge and Android apps have no problem. It appears the only problem is users connecting via the app that was installed from Testflight.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
The API server is not the web server so it cannot be opened with a browser. But, as I said, I can connect with the app running via the B4i bridge and Android apps have no problem. It appears the only problem is users connecting via the app that was installed from Testflight.
Did the SSL was updated recently?
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
I have narrowed the problem down a bit.

Problem does not happen on iPhone 8 with iOS 16.5.1
Problem does not happen on iPad Pro with iOS 16.2
Problem DOES happen on iPhone XR with iOS 17.2.1

So it appears the problem happens on the newer version of iOS but not on older versions.

Does anybody know what changed, as far as SSL goes, in the newer versions of iOS - and if so, what can I do to fix this? Can something be done on the client (iPhone) end or do I need to make changes on my API server? My API server is not using the lastest SSL configurations.

Edit - I updated iOS on the iPad to iOS 17.3 and the problem now also happens on the iPad, whereas before with iOS 16.2 it did not. So the problem is definitely related to the iOS version installed.
 
Last edited:
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Disabling ATS makes no difference, All of the API calls from the app to the server are https anyway.
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Also, I make all API calls from my B4i app to an IP address, no URLs. So ATS should have no relavance.
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
The problem was caused by the fact that my app was connecting to the API server by IP address rather than the domain name. When I switched to connecting via the domain name, its works fine again.

Apple must have tightened things up a bit with iOS17 from iOS16.
 
Upvote 0
Top