App Tracking Transparency-Request user authorization to access app-related data for tracking the user or the device.
You must use the AppTrackingTransparency framework if your app collects data about end users and shares it with other companies for purposes of tracking across apps and web sites. The AppTrackingTransparency framework presents an app-tracking authorization request to the user and provides the tracking authorization status.
To use the AppTrackingTransparency framework:
Set up a NSUserTrackingUsageDescription to display a system-permission alert request for your app installed on end-user devices.
Call requestTrackingAuthorization(completionHandler:) to present the app-tracking authorization request to the end user.
Use trackingAuthorizationStatus to determine the app-tracking permission status. See ATTrackingManager.AuthorizationStatus for status enums.
For more information about app tracking and privacy, see User Privacy and Data Use and App Privacy Details.
A class that provides a tracking authorization request and the tracking authorization status of the app.
A message that informs the user why an app is requesting permission to use data for tracking the user or the device.
If your app calls the App Tracking Transparency API, you must provide custom text, known as a usage-description string, which is displayed as a system-permission alert request. The usage-description string tells the user why the app is requesting permission to use data for tracking the user or the device. The app user has the option to grant or deny the authorization request. If you don’t include a usage-description string, your app may crash when a user first launches it.
Make sure your app requests permission to track sometime before tracking occurs. This could be at first launch or when certain features are used on your app. For example, when signing on with a third-party SSO.
Set the NSUserTrackingUsageDescription key in the Information Property List (Info.plist):
Select your project’s Info.plist file in the Xcode Project Navigator.
Modify the file using the Xcode Property List Editor: Privacy-Tracking Usage Description.
Use sentence-style capitalization and appropriate ending punctuation. Keep the text short and specific. You don’t need to include your app name because the system already identifies your app.
If the title is a sentence fragment, don’t add ending punctuation.
See Apple’s Human Interface Guidelines for example usage descriptions.