App Tracking Transparency
IDFA (Identifier for Advertisers)
Before iOS 14.5, advertisers could use the IDFA (Identifier for Advertisers) to measure ad performance and deliver personalized ads. With the introduction of ATT (App Tracking Transparency) in iOS 14.5 and stronger privacy protections, the IDFA value can now be obtained only if the user grants consent.
Use of ATT (App Tracking Transparency)
To request permission to access and use identifiers such as IDFA on iOS 14.5 and later, you must use the ATT (App Tracking Transparency) consent prompt. If you want to manually obtain permission to access the IDFA through code, please follow the five steps below.
There are two methods to obtain access permission to the IDFA (Identifier for Advertisers) through the five steps described on this page:
Manual acquisition method without coding
Using AdMob UMP (User Messaging Platform) to obtain IDFA access permission (recommended)
To obtain IDFA access permission using AdMob UMP’s IDFA request message feature, follow the instructions in this document to configure UMP (User Messaging Platform).
If you are serving, or plan to serve, an iOS application in the European Economic Area (EEA), follow the instructions in this document to configure UMP (User Messaging Platform).
Step 1. SDK Preparation
For new or updated apps, use iOS SDK version 2.5.0 or higher, and for Unity, use Unity Package version 2.5.0 or higher.
Step 2. SKAdNetwork Configuration
Regardless of the user’s ATT consent decision, Apple introduced SKAdNetwork to officially measure the success of ad campaigns. To use SKAdNetwork, add the list of ad network identifiers to your iOS app project’s Info.plist file.
(example)
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>example100.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>example200.skadnetwork</string>
</dict>
</array>

Step 3. Add Usage Description for Permissions
Add the NSUserTrackingUsageDescription
key to your Info.plist
file and provide a message explaining why the app is requesting permission.
If you do not add a description message to the Info.plist
file, the app may terminate unexpectedly (crash)
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

The usage description message you provide will be displayed in the ATT consent popup.

Step 4. Request permission
To display the permission request, call requestTrackingAuthorizationWithCompletionHandler:
When enabling the IDFA message feature of AdMob UMP (User Messaging Platform), the ATT consent prompt is automatically handled by UMP without any additional programming. Therefore, you can skip this step (Step 4) and the next step (Step 5).
AdMob UMP’s IDFA message feature is supported in iOS ADX SDK V2.5.0 and later, and Unity ADX SDK V2.5.0 and later.
To use the GDPR consent message and IDFA request message features included in AdMob UMP, please follow the instructions in this document to configure UMP (User Messaging Platform).
The ATT consent prompt must be requested when the app is fully running and in the Active state to display correctly.
Calling ATT in
application:didFinishLaunchingWithOptions:
will not work starting from iOS 15.
After the user grants App Tracking Transparency permission, use the completion callback to allow the ad SDK to access the IDFA and then request ads.
#import <AppTrackingTransparency/AppTrackingTransparency.h>
- (void)requestIDFA {
if (@available(iOS 14.5, *)) {
// Permission request via ATT prompt
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
}];
}
}
The ATT opt-in (ad tracking consent popup) for obtaining the IDFA can only be presented when the app is fully running in the Active state.
Before iOS 15, the ATT consent prompt could be shown immediately after app launch. Starting with iOS 15, it must be presented only after the app is fully running in the Active state.
Last updated
Was this helpful?