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.
1. Select [Identifiers] in the App Developer.
2. Click your app and check the “Push Notification” checkbox.
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).
Navigate to [Settings]>[Uninstall Tracking] in the Airbridge dashboard and select the [iOS] tab.
Enter all credentials.
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.
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.
Error Code | Meaning |
---|---|
403 (InvalidProviderToken) | Invalid APNs credentials. Enter the correct Key ID and Team ID, and try again. |
400 (TopicDisallowed) | Invalid Bundle ID. Enter the correct Bundle ID, and try again. |
400 (BadDeviceToken) | Invalid push token. The actual app environment and the app environment configuration may not match. |
410 (Unregistered) | Invalid push token. The actual app environment and the app environment configuration may not match, or the user may have deleted the app several days ago. |
410 (ExpiredToken) | Invalid push token. The actual app environment and the app environment configuration may not match, or the user may have deleted the app several days ago. |
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 purpose of the silent push test is to verify whether silent push notifications are being sent successfully using the submitted 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.
1. Navigate to [Xcode]>[Project file]>[Signing & Capabilities].
2. Click the “+ Capability” button.
3. Add Background Modes
and Push Notifications
.
4. Enable Remote notifications
in Background Modes
.
1. Open the AppDelegate
file.
2. Add the below code for calling registerForRemoteNotifications
function.
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;
}
3. Pass the Apple Push Notification service (APNs) authentication token to the Airbridge SDK.
func application(_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
{
AirBridge.registerPushToken(deviceToken)
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[AirBridge registerPushToken:deviceToken];
}
4. To hide the 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? Bool == true {
return;
}
...
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
if ([userInfo[@"airbridge-uninstall-tracking"] boolValue] == YES) {
return;
}
...
}
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?