iOS Uninstall Tracking

πŸ“˜

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

Introduction to Uninstall Tracking

Airbridge sends out daily silent push notifications to devices that have been registered within the last 6 months.
Uninstall data can be seen through Actuals Report, Raw Data Export, AWS S3 Export, and GCP Export.



Project Setup


Turn on Push Notifications at "App Identifier"

  1. Go to "Identifiers" at https://developer.apple.com/account/resources.
  2. Select the app's identifier and enable "Push Notifications".
2298

Key Setup

  1. Go to "Keys" at (https://developer.apple.com/account/resources).
  2. Enter the key that you're using and enable "Apple Push Notification service" (APNs).
2132

If you do not have a key, create a new key by clicking "+" and download the p8 file.



Send App Information to Airbridge


Send the following app information to your Airbridge CSM.

  • App ID Prefix
  • Bundle ID
  • p8 file
  • Key ID

App Identifier Information

  1. Go to "Identifiers" at https://developer.apple.com/account/resources.
  2. Select the app's identifier.
  3. The "App ID Prefix" and "Bundle ID" will be available.
2272

"Key" Information

  1. Go to "Keys" at https://developer.apple.com/account/resources.
  2. Choose the Key that you're using.
  3. The "Key ID" will be available
2272

The p8 file can only be downloaded when you create the key.



App Setting


Capabilities Setup

  1. Go to "Signing & Capabilities" for the "Project file" in Xcode.
  2. Click "+ Capability".
  3. Add "Background Modes" and "Push Notifications".
  4. Enable "Remote notifications" in "Background Modes".

AppDelegate Setup

  1. Open the AppDelegate file.
  2. Add the below codes.
func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
{
    ...
    UIApplication.shared.registerForRemoteNotifications()
    ...
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [UIApplication.sharedApplication registerForRemoteNotifications];
  
    return YES;
}
func application(_ application: UIApplication,
                 didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
{
    AirBridge.registerPushToken(deviceToken)
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    [AirBridge registerPushToken:deviceToken];
}
  1. In order to not display Airbridge's silent push notifications on the user's device, add the below exception handling logic code.
func application(_ application: UIApplication,
                 didReceiveRemoteNotification userInfo: [AnyHashable : Any],
                 fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)
{
    if userInfo["airbridge-uninstall-tracking"] as? Int == true {
        return;
    }
  
    ...
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
    if ([userInfo[@"airbridge-uninstall-tracking"] boolValue] == YES) {
        return;
    }
  
    ...
}