App Transport Security
Stay organized with collections
Save and categorize content based on your preferences.
App Transport Security
(ATS)
is a privacy feature that enforces secure connections. It's enabled by default
for new apps.
The following log message appears when a non-ATS compliant app attempts to serve
an ad using HTTP:
App Transport Security has blocked a cleartext HTTP (http://)
resource load since it is insecure. Temporary exceptions can be
configured in your app's Info.plist
file.
To disable ATS restrictions, add the following exceptions to your app's
Info.plist
:
NSAllowsArbitraryLoadsForMedia
NSAllowsArbitraryLoadsInWebContent
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoadsForMedia</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
The NSAllowsArbitraryLoadsForMedia
and NSAllowsArbitraryLoadsInWebContent
keys are required to make sure your ads are not impacted by ATS.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-29 UTC."],[[["App Transport Security (ATS) enforces secure connections and is enabled by default for new apps, blocking cleartext HTTP resource loads for enhanced security."],["To avoid ATS restrictions and ensure ad serving functionality, developers need to include `NSAllowsArbitraryLoadsForMedia` and `NSAllowsArbitraryLoadsInWebContent` exceptions within their app's `Info.plist` file."],["These exceptions allow media and web content to bypass ATS restrictions, preventing disruption to ad delivery."]]],[]]