IDFA support (iOS only)

  • This guide provides steps to integrate the IDFA message within the User Messaging Platform (UMP) SDK for iOS apps, specifically focusing on Apple's App Tracking Transparency (ATT) framework.

  • Before proceeding, ensure you have completed the UMP SDK setup and created an IDFA message in AdMob.

  • Update your app's Info.plist file by adding the NSUserTrackingUsageDescription key with a clear explanation of how you will use the IDFA, and link the AppTrackingTransparency framework for the UMP SDK to manage the ATT dialog.

  • During testing, note that the IDFA ATT dialog appears only once per app installation; to retest, uninstall and reinstall the app on your device.

Select platform: iOS Flutter

The User Messaging Platform (UMP) SDK lets you present an IDFA message to your users before requesting their consent for App Tracking Transparency (ATT). The IDFA message shows your users how your app uses the identifier.

This guide covers using the UMP SDK to present an IDFA message.

Prerequisites

Before you begin, make sure you've done the following:

Update Info.plist

To show a custom alert message, do the following:

  1. Open the Info.plist file.
  2. Add the NSUserTrackingUsageDescription key with a custom message that describes the usage:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

The usage description appears as part of the IDFA ATT alert when you present the consent form:

Then, link the AppTrackingTransparency framework:

Your app then shows an IDFA message before the ATT alert.

Testing

While testing, remember that the ATT alert only appears a single time since requestTrackingAuthorization is a one-time request. The UMP SDK only has a form available to load if the authorization status is ATTrackingManagerAuthorizationStatusNotDetermined.

To make the alert appear a second time, you must uninstall and reinstall your app on your test device.

Request ads with or without IDFA

If a user denies ATT, continue to request ads using your ad format's APIs. The Google Mobile Ads SDK doesn't send IDFA in the ad request. For more details see, Select an ad format.