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"
- Go to "Identifiers" at https://developer.apple.com/account/resources.
- Select the app's identifier and enable "Push Notifications".
Key Setup
- Go to "Keys" at (https://developer.apple.com/account/resources).
- Enter the key that you're using and enable "Apple Push Notification service" (APNs).
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
- Go to "Identifiers" at https://developer.apple.com/account/resources.
- Select the app's identifier.
- The "App ID Prefix" and "Bundle ID" will be available.
"Key" Information
- Go to "Keys" at https://developer.apple.com/account/resources.
- Choose the Key that you're using.
- The "Key ID" will be available
The p8 file can only be downloaded when you create the key.
App Setting
Capabilities Setup
- Go to "Signing & Capabilities" for the "Project file" in Xcode.
- Click "+ Capability".
- Add "Background Modes" and "Push Notifications".
- Enable "Remote notifications" in "Background Modes".
AppDelegate
Setup
AppDelegate
Setup- Open the
AppDelegate
file. - 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];
}
- 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;
}
...
}
Updated over 2 years ago