Apple App Tracking Transparency
Configure your app to be compliant with Apple's User Privacy and Data Use Policies using the AppTrackingTransparency Framework.
For iOS 14.5+ all apps must obtain explicit consent from the user if they collect and share user data with other companies for the purposes of tracking across apps and web sites.
Fortunately, Median makes it easy for you to configure your app to utilize Apple's AppTrackingTransparency Framework to remain compliant.
-
Enable App Tracking Transparency on the Permissions tab.
-
Set "Automatic" or "Manual" to prompt automatically on initial app launch or manually at run time via the JavaScript Bridge. You may provide a NSUserTrackingUsageDescription with a description of the tracking request to users. You can use the Median default description or set your own.
To prompt for consent at run time manually, add and call the following function:
↔️Median JavaScript Bridge
function request(){ median.ios.attconsent.request() .then(function (result) { // *** your code *** }); }
The
result
object will be{ granted: true|false }
based on the user's response to the consent prompt.
Note: For iOS 14.4 and lower,result
object will always be{ granted: true}
- Use the result of the user's consent to adjust the tracking and data collection you perform within your app.
↔️Median JavaScript Bridge
To check whether consent was obtained (either through the manual prompt or automatic prompt), add and call the following function:
function status(){ median.ios.attconsent.status() .then(function (result) { // *** your code *** }); }
The
result
object will be{ granted: true|false }
based on the user's response to the consent prompt.
Note: For iOS 14.4 and lower,result
object will always be{ granted: true}
Learn more about the AppTrackingTransparency Framework.
Review our blog article for more details.
Updated about 2 months ago