App Transport Security does not work any more with iOS 11 Xcode 9

Fouad Helmy picture Fouad Helmy · Nov 15, 2017 · Viewed 8.6k times · Source

I've been working on an app...since the iOS 11 update disabling ATS does not work anymore I've added the below in the info.plist

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

I can't use the domain exception key as I am downloading images from unknown domains. below is what I get when trying to download an image

Task <C3DC30F1-5869-46F6-ABA4-5E1EC8334FD8>.<0> HTTP load failed (error code: -1005 [4:-4])
NSURLConnection finished with error - code -1005

Answer

Ashish picture Ashish · Nov 15, 2017

I am aware that IOS 11 not longer supports the following:

  • RC4 3DES-CBC AES-CBC
  • MD5 SHA-1
  • <2048-bit RSA Pub Keys - All TLS connections to servers
  • http://
  • SSLv3
  • TLS 1.0
  • TLS 1.1

Adding the following we can bypass the ATS (App Transport Security) error:

<key>NSAppTransportSecurity</key> <dict>
     <key>NSExceptionDomains</key>
     <dict>
         <key>mydomain.com</key>
         <dict>
             <!--Include to allow subdomains-->
             <key>NSIncludesSubdomains</key>
             <true/>
             <key>NSExceptionRequiresForwardSecrecy</key>
             <false/>
         </dict>
     </dict> </dict>

Reference link : iOS 11 ATS (App Transport Security) no longer accepts custom anchor certs?