This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo TrackingTransparency
A library for tracking app users and managing tracking permissions.
A library for tracking app users and managing tracking permissions. Provides access to advertising identifiers and manages the required permissions for tracking. Examples of data used for tracking include email address, device ID, advertising ID, and more. If the "Allow Apps to Request to Track" device-level setting is off, this permission will be denied. Be sure to add NSUserTrackingUsageDescription to your Info.plist to explain how the user will be tracked. Otherwise, your app will be rejected by Apple.
For more information on Apple's App Tracking Transparency framework, see their documentation.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Configuration in app config
You can configure expo-tracking-transparency using its built-in config plugin if you use config plugins in your project (Continuous Native Generation (CNG)). The plugin allows you to configure various properties that cannot be set at runtime and require building a new app binary to take effect. If your app does not use CNG, then you'll need to manually configure the library.
Example app.json with config plugin
Configurable properties
Are you using this library in an existing React Native app?
If you're not using Continuous Native Generation (CNG) (you're using native android and ios projects manually), then you need to configure following permissions in your native projects:
-
For Android, add
com.google.android.gms.permission.AD_IDpermission to your project's android/app/src/main/AndroidManifest.xml.<uses-permission android:name="com.google.android.gms.permission.AD_ID"/> -
For iOS, add
NSUserTrackingUsageDescriptionkey to your project's ios/[app]/Info.plist:<key>NSUserTrackingUsageDescription</key> <string>Your custom usage description string here.</string>
Usage
API
import * as ExpoTrackingTransparency from 'expo-tracking-transparency';
No API data file found, sorry!
Permissions
Android
The following permissions are added automatically through the library's AndroidManifest.xml.
iOS
The following usage description keys are used by this library: