Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is ATS policy have been changed in iOS 13 and Allow Arbitrary Loads now doesn't work?

Tags:

ios13

xcode11

Xcode 11 beta 3, iOS 13 in plist I have:

<key>NSAllowsArbitraryLoads</key>
<true/>

And all http requests work prior iOS 13. In iOS 13 I'm seeing in console:

Cannot start load of Task <...>.<1> since it does not conform to ATS policy Task <...>.<1> finished with error [-1022] Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.,

Is ATS policy have been changed in iOS 13? I can't find any info about it

like image 569
daleijn Avatar asked Jan 27 '26 21:01

daleijn


1 Answers

According to the current docs it's still possible to use this key, however it's likely you'll be asked to provide some explanation during App Store review.

Since this is a beta release, it's possible that this is also an issue in tooling rather than an explicit change.

Note that:

In iOS 10 and later and macOS 10.12 and later, the value of the NSAllowsArbitraryLoads key is ignored—and the default value of NO used instead—if any of the following keys are present in your app’s Information Property List file: NSAllowsArbitraryLoadsForMedia NSAllowsArbitraryLoadsInWebContent NSAllowsLocalNetworking

In the mean time, would you consider using NSDomainExceptions as a workaround? It's a better practice at any rate to add exceptions for a specific domain, rather than just allowing unsecured loads across your app. Exception domain docs for your reference

like image 64
Alexei Avatar answered Feb 01 '26 16:02

Alexei



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!