iOS Uninstall Tracking

Airbridge sends silent push notifications to users who have performed any app event at least once in the past 6 months to check if they have deleted the app. These notifications are sent daily between 3:00 PM and 4:00 PM UTC. You can view the uninstall events in the Airbridge reports and raw data export files.

Note

App uninstall tracking is supported by Airbridge iOS SDK v1.13.0 and later.

Uninstall Tracking Setup

Enable push notification

1. Select [Identifiers] in the App Developer.

2. Click your app and check the “Push Notification” checkbox.

Get the APNs Credentials

APNs Auth Key and Key ID

1. Select [Keys] and click the “+” button. When a new Auth Key is created, download the Auth Key which is a p8 file. The APNs Auth Key can be downloaded only once after the key has been newly created and can’t be downloaded again. If you lose the key, you need to create a new key. Up to 2 Auth keys can be created at once.

2. To find the Key ID, select [Keys] and click your new Auth Key.

Bundle ID

Navigate to [Certificates, Identifiers & Profiles]>[Identifiers] in the Apple Developer. Click your app to find the Bundle ID.

Team ID (App ID Prefix)

Navigate to [Account]>[Membership details] in the Apple Developer to find the Team ID (App ID Prefix).

Register the Credentials to Airbridge

  1. Navigate to [Settings]>[Uninstall Tracking] in the Airbridge dashboard and select the [iOS] tab.

  2. Enter all credentials.

Select App Environment

The push notification destination changes depending on your app environment. Carefully select the app environment for testing push notifications.

  • Production: Select when your app is released on the App Store for end users or when your app is a beta app released via TestFlight, Ad Hoc, and Enterprise. Push tokens used for app install tracking will be collected.

  • Development: Select when your app is built using Xcode. Push tokens used in the development environment will be collected. In the development environment, you can only test silent push notifications. If you want to track actual uninstall events, conduct the setup for your app in the production environment.

Test silent push notification

The silent push notification test is a test to verify if silent push notifications are being sent successfully using the entered credentials. This is only a test and clicking the button does not result in any tracking of actual uninstall events.

The verification of the Bundle ID can only be conducted by the silent push notification test, and therefore it is strongly recommended to test the silent push notification.

To conduct the test, click the “Test silent push” button and enter the APNs push token (Device token). The push token differs depending on the app environment. Make sure the push token and the app environment match before conducting the test. The APNs push token can be found in the Apple Developer Guide.

When the silent push notification is successfully sent, you will see the success message. If the test fails, you can see the error code in the fail message. For more details on the error codes, refer to the Apple Developer Guide.

Some error codes that indicate that the app has been deleted could show as a result of the silent push test. Regardless, be reminded that the silent push notification test is just a test to verify if silent push notifications are being sent successfully using the entered credentials.

Test the silent push notification on a device for testing purposes where the app has been installed recently and retained for the last 10 days.

App Setting

Capabilities Setup

1. Navigate to [Xcode]>[Project file]>[Signing & Capabilities].

2. Click the “+ Capability” button.

3. Add Background Modesand Push Notifications.

4. Enable Remote notificationsin Background Modes.

AppDelegate Setup

1. Open the AppDelegatefile.

2. Add the below code for calling registerForRemoteNotifications function.

1234567
func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
{
    ...
    UIApplication.shared.registerForRemoteNotifications()
    ...
}

3. Pass the Apple Push Notification service (APNs) authentication token to the Airbridge SDK.

12345
func application(_ application: UIApplication,
                 didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
{
    AirBridge.registerPushToken(deviceToken)
}

4. To hide the silent push notifications on the user's device, add the below exception handling logic code.

12345678910
func application(_ application: UIApplication,
                 didReceiveRemoteNotification userInfo: [AnyHashable : Any],
                 fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)
{
    if userInfo["airbridge-uninstall-tracking"] as? Bool == true {
        return;
    }
  
    ...
}

Start Tracking Uninstall Events

Once the credentials are entered in the Airbridge dashboard, and the Airbridge SDK setup is finished, the “Enable uninstall tracking] toggle will be activated. Switch on the toggle to start tracking uninstall events. For more details on uninstall tracking, refer to this article.

Was this page helpful?

Have any questions or suggestions?