Connect to HTTPS server but ATS Issue

When I investigated the cause of this, I noticed that it was blocked by ATS. I changed the info.plist code as follows but it didn't work.

<key>NSAppTransportSecurity</key>
<dict>
   <key>NSAllowsArbitraryLoads</key>
   <true/>
   <key>NSExceptionDomains</key>
   <dict>
   <key>poishogi.de</key>
     <dict>
       <key>NSExceptionAllowsInsecureHTTPLoads</key>
       <true/>
     </dict>
   </dict>
</dict>

However, poishogi.de uses HTTPS, WSS communication, and the TLS version is 1.3, using X25519, AES_256_GCM. WSS is on the same server as HTTPS and running on the same port 443. I'm using HTTPS and WSS, but I find it strange that I have to register with NSExceptionDomains.

Do you know why something is rejected by ATS?

Accepted Answer

The first step in investigating a URLSession TLS issue is to disable ATS entirely. That is, modify your NSAppTransportSecurity dictionary to contain just the NSAllowsArbitraryLoads property. That’ll either fix things or it won’t. If it fixes things, you know you have an ATS issue and you can investigate from there. If it doesn’t fix things, you know that ATS isn’t the issue and you need to look for other causes.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Connect to HTTPS server but ATS Issue
 
 
Q