Ios Uninstall Tracking (APN)
Overview
Track app uninstalls using Apple Push Notification Service (APNs) to measure user retention and optimize your campaigns.
iOS uninstalls take 9+ days to appear in reports due to Apple Push Notification service.
Prerequisites
- iOS 10.0 or higher
- Xcode 12.0 or later
- Apple Developer Account
- Apptrove SDK installed
Step 1: Request Certificate in Keychain Access
1.1. Open Keychain Access on your Mac.
1.2. Go to Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority.

1.3. Fill in the form:
- User Email Address: Your email
- Common Name: Your name
- Request is: Select Saved to disk
- Click Continue
1.4. Save the file to your Desktop.

Step 2: Go to Apple Developer Portal - Identifiers
2.1. Open Apple Developer Portal.
2.2. Go to Certificates, Identifiers & Profiles.
2.3. Click Identifiers.
2.4. Select your App ID (your app's bundle ID/package name).

Step 3: Configure Push Notifications
3.1. After clicking your App ID, you'll see the App ID Configuration page.
3.2. Scroll to Capabilities section.
3.3. Check Push Notifications.
3.4. Click Configure.

Step 4: Upload Certificate and Download .cer
4.1. In the Push Notifications configuration screen, choose:
- Production SSL Certificate (for App Store/Production)
- Click Create Certificate
4.2. Click Choose File and upload the .certSigningRequest file from Step 1.
4.3. Click Continue.
4.4. Click Download to save the .cer file.

Step 5: Go to Keychain and Export as .p12
5.1. Double-click the downloaded .cer file to open it in Keychain Access.
5.2. In Keychain Access, click My Certificates in the left sidebar.
5.3. Find your Push Notification certificate (e.g., "Apple Push Services: com.yourapp.package").
5.4. Right-click on the certificate → Select Export.
5.5. Save as:
- File Format: Personal Information Exchange (.p12)
- Enter a password (you will need this later)
- Click Save

Step 6: Upload .p12 to Apptrove Panel
6.1. Log in to your Apptrove Panel.
6.2. Go to Settings > Uninstall Tracking.
6.3. Select your iOS app.
6.4. Click Upload and select the .p12 file.
6.5. Enter the password you created in Step 5.
6.6. Click Save.
Step 7: Configure in Xcode
7.1. Open your project in Xcode.
7.2. Select your app Target → Signing & Capabilities tab.
7.3. Click + Capability → Add Push Notifications.
7.4. Click + Capability again → Add Background Modes.
7.5. Check Remote notifications.

Step 8: Add User Permission in Info.plist
8.1. Open your project in Xcode.
8.2. Open the Info.plist file.
8.3. Add the following key and description:
Key: NSUserNotificationsUsageDescription
Value: We need permission to send you notifications and track uninstalls.
You can also add it in the Source Code view:
<key>NSUserNotificationsUsageDescription</key>
<string>We need permission to send you notifications and track uninstalls.</string>
This permission message will be shown to users when your app requests notification access.
Step 9: Send Token to Trackier SDK
Add this code to your AppDelegate.swift:
import UIKit
import trackier_ios_sdk
import UserNotifications
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Initialize Trackier SDK
let config = TrackierSDKConfig(
appToken: "YOUR_SDK_KEY",
env: TrackierSDKConfig.ENV_PRODUCTION
)
TrackierSDK.initialize(config: config)
// Request notification permission
UNUserNotificationCenter.current().requestAuthorization(
options: [.alert, .sound, .badge]
) { granted, error in
if granted {
DispatchQueue.main.async {
UIApplication.shared.registerForRemoteNotifications()
}
}
}
return true
}
// Get token and send to Trackier SDK
func application(_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
print("APN Token: \(token)")
// Send to Trackier SDK
TrackierSDK.sendAPNToken(token: token)
}
// Handle registration failure
func application(_ application: UIApplication,
didFailToRegisterForRemoteNotificationsWithError error: Error) {
print("Failed to register: \(error.localizedDescription)")
}
}
Step 10: Check Logs
Run your app on a physical device (Simulator doesn't support APNs).
Check Xcode console logs. You should see:
APN Token: b0adf7c9730763f88e1a048e28c68a9f806ed032fb522debff5bfba010a9b052
Apn token Api response saved successfully

Success: "Apn token Api response saved successfully"
Error: If you see an error message, check the troubleshooting section below.
Troubleshooting
Issue: Token Not Generated
Check:
- Push Notifications capability is enabled in Xcode
- Testing on physical device (not Simulator)
- User granted notification permission
Issue: "API Response Failed" Error
Check:
- .p12 certificate uploaded to Apptrove panel
- Password is correct
- Using Production certificate for App Store builds
- SDK is initialized before calling
sendAPNToken
Issue: User Denied Notification Permission
Solution: User must enable in Settings > [Your App] > Notifications
Issue: Uninstalls Not Appearing in Dashboard
Remember: Takes 9+ days to appear for production builds.
Complete Flow Summary
- Keychain Access → Request Certificate → Save
.certSigningRequestfile - Apple Developer Portal → Identifiers → Select your App ID
- Configure Push Notifications → Enable and click Configure
- Upload Certificate Request → Download
.cerfile - Keychain Access → Export
.ceras.p12with password - Apptrove Panel → Upload
.p12file + password - Xcode → Enable Push Notifications + Background Modes
- Info.plist → Add user permission description
- AppDelegate → Call
TrackierSDK.sendAPNToken(token:) - Check Logs → Verify "Apn token Api response saved successfully"
SDK Method
sendAPNToken(token:)
Send the APN token to Apptrove for uninstall tracking.
Usage:
TrackierSDK.sendAPNToken(token: "your_apn_token_string")
When to call: After SDK initialization, in didRegisterForRemoteNotificationsWithDeviceToken method.
For support, contact support@trackier.com.