"ssl error occurred, and a secure connection to the server cannot be made" connection to the internal development server only by phone

I developed an iOS application that connects to an internal web server. When I used the simulator, it works fine, but when I create the same application on the iPhone, it gives me the error message "an ssl error occurred and it was not possible to create a secure connection to the server." Why does the error only occur on the iPhone not in the simulator?

Here is my Xcode 8.2 environment iOS 10.3 Objective-C - My client code uses ATS by default. AFNetworking 3.1 structure. Web server - only TLS 1.2 support. Web server certificate does not yet support direct secrecy.

Maybe because my Cert does not meet the requirements of ATS?

+7
ios app-transport-security
source share
1 answer

After I read this document from Apple

<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>Your Domain</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict> 

My application now works on devices. My server certificate is not yet ready for forwarding.

+5
source share

All Articles