Uninstall Tracking Setup - iOS SDK (v4)

Note

This is a guide for installing and setting up the iOS SDK v4. For previous versions, refer to the iOS SDK (v1) guide.

Airbridge sends silent push notifications everyday between 0:00 and 1:00 KST (Korea Standard Time) to users who have tracked app events at least once in the past 6 months, to check whether the app has been deleted. You can check app deletion events through Airbridge reports and by extracting original data.

Submit Credentials

Enter your Apple Developer Center certification information on the Airbridge dashboard.

Get credentials from Apple Developer

Please check the following 4 pieces of certification information at the Apple Developer Center.

Submit credentials to Airbridge

Enter all the certification information from the Apple Developer Center into [Settings]>[Uninstall Tracking]>[iOS App Uninstall Tracking] of Airbridge.

Select app environment

After entering all the authentication information in Airbridge, select the app environment to collect push tokens.

The push token collected differs depending on the app environment you choose. For example, push tokens collected in the Production environment cannot be used in the Development environment.

Test silent push notifications

Silent Push Test is a test that lets you confirm whether the silent push is being sent correctly. When you click 'Silent Push Test', you can verify whether the silent push is being properly sent to your device with the entered authorization information. The silent push test does not measure or generate app deletion events, so you cannot verify app deletions on the Airbridge dashboard.

One of the authentication informations needed for app deletion tracking, the Bundle ID, can only be validated through the Silent Push Test. Therefore, we recommend proceeding with the silent push test.

To conduct a silent push test, you need an APNs push token (device token). The push token you collect varies depending on the app environment. You need to check the push token and the app environment before conducting a silent push test. Please refer to the Apple Developer Guide for how to check the APNs push token.

When you send a silent push to a device from Airbridge, you can check for a success message or an error code. The main error codes that can be checked via a silent push test in an iOS environment are as follows. For more information about error codes, please refer to the Apple developer guide.

Attention

You cannot conduct silent push tests on the iOS Simulator.

Set Up the Airbridge SDK

In order to track app deletions that occurred in the iOS environment, you need to set up identifiers to allow silent push notifications in the app, and add capabilities. Also, you need to add code to ignore silent push notifications that are aimed at tracking app deletions.

Add capabilities

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

2. Click on '+ Capability'. Please also select Push Notifications. Then select Background Modes and check Remote Notification.

Enable push notifications

You can use push notifications in the app by calling the registerForRemoteNotifications function. If you have not used push notifications before, please call this function.

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

After the setup, every time a push alert, including silent push alerts, is sent, the application(_:didFinishLaunchingWithOptions:) function is always called. If a silent push alert is sent, this function is called after the app has been run in the background. Even if the app changes to foreground from the background, the function will not be called again.

You can check whether the application(_:didFinishLaunchingWithOptions:) function was called using launchOptions. Please refer to the code below.

12345678
func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
    let key = UIApplication.LaunchOptionsKey.remoteNotification
    let isLaunchRemoteNotification: Bool = launchOptions?[key] != nil
}

Send the APNs push token

Once the APNs Push Token is generated, please deliver it to the SDK by calling the registerPushToken function.

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

Silence push notifications

The silent push alarm sent by Airbridge for app deletion tracking is an alarm that should not appear on the user's app. The app should ignore this push alarm. Please refer to the code below.

12345678910
func application(_ application: UIApplication,
                 didReceiveRemoteNotification userInfo: [AnyHashable : Any],
                 fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)
{
    if Airbridge.isUninstallTrackingNotification(userInfo) {
        return
    }
  
    ...
}

Enable Uninstall Tracking

Once you enter the authentication information on the Airbridge dashboard and complete the Airbridge SDK setup, you can activate the app deletion tracking toggle. When the toggle is activated, app deletion tracking starts.

For more details on app deletion, please check the Airbridge guide.

Was this page helpful?

Have any questions or suggestions?