← All articlesMobile applications

App Transport Security in iOS: review exceptions before release

A broad App Transport Security exception can reach production from an old debugging configuration. Finding the key does not establish that data is sent over HTTP. A useful conclusion connects build settings to actual networking paths and tests their behavior. Here is a practical approach for your own team.

Where ATS applies and where it is not enough

App Transport Security operates by default for apps linked against modern SDKs and applies to the standard URL Loading System, typically URLSession. It requires HTTPS and additional TLS and certificate properties. An https address alone therefore does not establish compliance with every ATS requirement.

ATS does not cover every connection mechanism. For example, Network framework and lower-level networking interfaces require separate security controls. If a library uses a different networking path, the absence of ATS errors says nothing about whether that path was checked. Identify the mechanism behind each connection before drawing conclusions about traffic protection.

Review combined settings rather than one string

Exceptions are configured through NSAppTransportSecurity in Info.plist. When applicable, NSAllowsArbitraryLoads=YES weakens ATS for domains outside NSExceptionDomains. That permits an insecure connection; it does not prove the application makes one. HTTPS ordinarily retains default server trust evaluation unless the code separately weakens it.

Behavior depends on the full combination of keys and the iOS version. Some specialized settings change how the general NSAllowsArbitraryLoads setting applies. NSExceptionDomains defines a separate policy for listed domains, where global keys do not apply. An empty domain dictionary may retain the default requirements, so the list itself does not mean HTTP is permitted.

Separate the API from an embedded WebView

NSAllowsArbitraryLoadsInWebContent=YES applies to WKWebView and does not weaken URLSession in the same way. An app may have different rules for its own API and an embedded help screen. Do not generalize the result from one path to the other.

For domain exceptions, check the exact hostname and whether subdomains are included. NSExceptionDomains is not a universal allowlist of app destinations. Make a genuinely necessary exception as narrow as possible; Apple recommends fixing the server, certificates and URLs first. Some settings that weaken protection require justification during App Store review.

A fictional example: an old image host

Imagine a fictional workout scheduling app with its own API, photos and a help screen in WKWebView. Its archive contains a broad exception once added for an old image host. This calls for checking whether the request still exists and which component sends it. The key alone does not confirm a data leak.

Create a table of purpose, actual URL, owner, networking mechanism and exception. Include sign-in, schedule updates, image and file uploads, SDKs and WebView where the product uses them. An unused address, an active connection and an available setting are three different research outcomes.

Check the final build and real user flows

Inspect the final Info.plist in the exported release build rather than only the project file. Check the app and its extensions, which may have different settings. Record the build and iOS versions so the result can be reproduced.

Create a separate test build without unnecessary exceptions. Use test accounts and synthetic data; there is no need to change the main application for this experiment. Run user flows and record specific errors, including transitions between hosts and WebView behavior. An absent request or a general network failure does not demonstrate that protection works.

Use positive and negative controls

On your own test server, first establish that HTTPS with a valid certificate works. Then, on the same URLSession path without exceptions, check that HTTP and a certificate failing trust evaluation are rejected. Match the error to the intended request: a DNS failure is not an ATS test.

Account for a root certificate installed in the test environment and any debugging proxy, since they may alter trust evaluation. A successful connection in that environment does not prove the release build’s normal security. Check lower-level networking and third-party SDKs separately; plist analysis provides only part of the picture.

Fix the cause and repeat the checks

Remove unnecessary exceptions, fix HTTPS and certificates on your server, then rerun functional and negative tests. If an unavoidable exception remains, assign an owner and a review date. List the covered flows and networking paths in the final document, and identify the remaining gaps explicitly.

You can start checking your website or the web part of your product with a free CheckMyApp audit using the button below. The ATS review described here is performed by your team on its own iOS build; the service’s automated mobile audit is not yet available for purchase.

Sources and documentation

  1. Apple — Preventing Insecure Network Connections
  2. Apple — NSAppTransportSecurity
  3. Apple — NSAllowsArbitraryLoads
  4. Apple — NSAllowsArbitraryLoadsInWebContent
  5. Apple — NSExceptionDomains
  6. Apple — Fine-tune your App Transport Security settings
CheckMyApp

Check your application’s security.

Enter your web application address and email. Get a free preliminary report and choose the depth of analysis.

Check for free