AppTrackingTransparency in iOS

Official Content

Introduction

AppTrackingTransparency is a iOS 14 feature, and it is mandatory -required by Apple- starting with iOS 14.5.

Even though GeneXus does not track user’s activity, some of the SDKs that the iOS flexible client use do use this feature, and so, if the generated application tracks the user’s activity, it needs to ask for permission before tracking. Take a look at the When to ask for permissions section bellow.

The user should be asked for permissions even if the tracking takes place on the application’s server and not on the device.

Read carefully Apple’s User Privacy and Data Use document, specially the “Asking Permission to Track” section.

Changes in your app

To make the correct use of AppTrackingTransparency, you will have to make some changes in you application.

First, set an appropriate value in the main object’s User Tracking Usage Description property, located in Apple > Permissions > Purpose Strings.

Then, check the authorization status by using the UserTrackingPermissionStatus property from the Permissions external object. The action to take depends on the returned value:

  • If it returns Restricted or Denied, the app does not haver permission to track the user
  • If it returns Authorized, the app can track the user
  • If it returns NotDetermied, it means that it has never asked for permission and needs to do so, by calling the RequestUserTrackingPermission method from the Permissions external object.

In case the user denies the permission request, there is no way to ask for it again, except by asking the user to change it in the Settings app. It is advisable to provide the information on how to enable this permission if it was denied, so that the user can authorized it.

Warning: It is forbidden by Apple to limit the functionality fo the application if the user denies this permission.

Considerations

This feature is available in iOS 14 and later versions. If the device is running an earlier version, the property UserTrackingPermissionStatus always returns Authorized.

The user may turn this permission off completely by going to Settings.app > Privacy > Tracking > Allow Apps to Request To Track. In that case, the UserTrackingPermissionStatus property will always return Denied.

Using this API is mandatory starting from April 26th, 2021. Not using it and tracking user information anyway may incur in violations of the the App Store Review Guidelines. Take a look at the Data Use and Sharing section of the guidelines.

When to ask for permission

This API should be used when:

  • The app needs to use the IDFA, likely when using Analytics or showing Ads.
  • The app performs server-side tracking of any information that allows tracking the device or the user, by using information provided by the device. Exceptions to this rule can be found in Apple’s User Privacy and Data Use document.

Availability

The User Tracking Usage Description property and the new method (RequestUserTrackingPermission) and property (UserTrackingPermissionStatus) in the Permissions external object are avaible as of GeneXus 17 upgrade 3