A Boolean value indicating whether to allow loading of local resources.
- iOS 10.0+
- macOS 10.12+
In iOS 9 and macOS 10.11, App Transport Security (ATS) disallows connections to unqualified domains,
.local domains, and IP addresses. You can add exceptions for unqualified domains and
.local domains in the NSExceptionDomains dictionary, but you can’t add numerical IP addresses. Instead you use
NSAllows when you want to load directly from an IP address.
In iOS 10 and macOS 10.12 and later, ATS allows all three of these connections by default, so you no longer need an exception for any of them. However, if you need to maintain compatibility with older versions of the OS, set both of the
NSAllows keys to
The local networking exception tells newer versions of the OS—which already allow unqualified domains,
.local domains, and IP addresses—to ignore the arbitrary loads key. Meanwhile, the arbitrary loads key tells older versions of the OS, which don’t process the local networking exception key, to bypass ATS completely. This allows your app to work on different OS versions while minimizing the use of the wider exception. For more information about how global ATS exceptions interact across OS versions, see the NSAppTransportSecurity key’s Versioning section.