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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With