2

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
rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 1
    It might be that the error is not connected to ATS, but indicates an network timeout. Could you check this before: https://stackoverflow.com/questions/25372318 – Andreas Oetjen Nov 15 '17 at 06:49
  • 1
    ATS exception works with iOS11. There might be some other issue with your code or at server side. – miOS Nov 15 '17 at 06:50

2 Answers2

4

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?

shim
  • 9,289
  • 12
  • 69
  • 108
Ashish
  • 2,977
  • 1
  • 14
  • 32
0

I had also faced same issue where I was getting following errors -

Task <DEBDD8DA-3D0D-43E0-B61A-CEFBDD6FF070>.<1> finished with error - code: -999
finished with error - code: -1001
Task <2C0D248B-1FBE-4DA0-B50A-0421E2509F42>.<2> load failed with error Error Domain=NSURLErrorDomain Code=-1001 "The request timed out.

Earlier I was using Automatically manage signing option under the General tab. When I have created new provisional profiles, I was not having this issue anymore.

Solution - Don't use Automatically manage signing option and create and add your Provisional Profiles.

Prashant Gaikwad
  • 3,493
  • 1
  • 24
  • 26