App Tracking Transparency

Starting in iOS 14, IDFA will be unavailable until an app calls the App Tracking Transparency framework to present the app-tracking authorization request to the end-user. If an app does not present this request, the IDFA will automatically be zeroed out which may lead to a significant loss in ad revenue. 

To display the App Tracking Transparency authorization request for accessing the IDFA, update your Info.plist to add the NSUserTrackingUsageDescription key with a custom message describing the usage. 

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

And AppTrackingTransparency.framework to your project.


1. Stack Consent Manager

If you are using StackConsentManager framework in your project there are no additional steps required. Authorization request will be shown for users under iOS 14.5 and higher after -[STKConsentManager showConsentDialogFromRootViewController:delegate:] method invokes. 

There are not additional steps needed. Consent Manager integration remains the same as GDPR/CCPA section.

Because of Consent Manager will show ATT request only for users under iOS 14.5 or higher you might be to add some notes in App Review Information section of app version page in App Store Connect. For example it can be something like: App Tracking Transparency request is only available for users under iOS 14.5 or higher. This step can be needed because Apple can reject builds that contains AppTrackingTransparency.framework but which ATT requests are not showing at app launch.

2. Manually

If you are using StackConsentManager framework in your project but want to present App Tracking Transparency request alert by yourself you need to disable Consent Manager ATT logic:

class YourAppDelegate: AppDelegate {
    override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]?) -> Bool {
		STKConsentManager.shared().disableAppTrackingTransparencyRequest()
        STKConsentManager.shared().synchronize(withAppKey: "Your app key") { error in
            guard let error = error else { return }
            print("Error occurred during synchronization: \(error)")
        }
        return true
    }
}

Call requestTrackingAuthorizationWithCompletionHandler:. to present the App Tracking Transparency authorization request alert. Call this method at the application launch event. We recommended initializing Appodeal SDK in the completion block. 

import AppTrackingTransparency
import AdSupport

class AppDelegate : UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
		ATTrackingManager.requestTrackingAuthorization() { status in
			// Tracking authorization completed. Initialise Appodeal here.
		}
		return true
	}
}