iOS Uninstall Tracking Setting

πŸ“˜

μ•± μ‚­μ œ 좔적은 Airbridge iOS SDK v1.13.0 이후 버전 λΆ€ν„° μ‚¬μš© κ°€λŠ₯ν•©λ‹ˆλ‹€.

μ„€μ •

μ—μ–΄λΈŒλ¦Ώμ§€ SDK 의 Uninstall tracking κΈ°λŠ₯은 Silent push notification 을 ν™œμš©ν•˜μ—¬ κ΅¬ν˜„λ©λ‹ˆλ‹€. κ·Έλž˜μ„œ 이 κΈ°λŠ₯을 μ‚¬μš©ν•˜κΈ° μœ„ν•΄ μ•±μ—μ„œ Silent push notification 이 λ™μž‘λ˜λ„λ‘ App Identifier μ„€μ • 및 Capabilities μΆ”κ°€, 그리고 Silent push notification 이 앱에 μ „λ‹¬λ˜μ—ˆμ„ λ•Œ Uninstall tracking 을 μœ„ν•œ 것이라면 λ¬΄μ‹œν•˜λŠ” μ½”λ“œ μΆ”κ°€κ°€ ν•„μš”ν•©λ‹ˆλ‹€.

ν”„λ‘œμ νŠΈ μ„€μ •

App Identifier μ—μ„œ Push Notification 켜기

  1. https://developer.apple.com/account/resources 의 Identifiers 둜 이동해 μ£Όμ„Έμš”.
  2. Uninstall Tracking ν•˜κ³ μžν•˜λŠ” μ•±μ˜ Identifier λ₯Ό ν΄λ¦­ν•˜μ—¬ Push Notifications λ₯Ό 체크해 μ£Όμ„Έμš”.
2298

Key μ—μ„œ Push Notification 켜기

  1. https://developer.apple.com/account/resources 의 Keys 둜 이동해 μ£Όμ„Έμš”.
  2. μ‚¬μš©ν•˜λŠ” Key λ₯Ό edit ν•˜μ—¬ Apple Push Notification service λ₯Ό 체크해 μ£Όμ„Έμš”.
2132

μ‚¬μš©ν•˜λŠ” Key κ°€ μ—†λŠ” 경우 + λ²„νŠΌμ„ 눌러 μƒˆλ‘œ μƒμ„±ν•˜κ³  p8 을 λ‹€μš΄λ‘œλ“œ ν•΄μ£Όμ„Έμš”.

App 정보 등둝

App ID Prefix 및 Bundle ID 등둝

2272
  1. https://developer.apple.com/account/resources 의 Identifiers 둜 이동해 μ£Όμ„Έμš”.
  2. Uninstall Tracking ν•˜κ³ μžν•˜λŠ” App 의 Identifier λ₯Ό 클릭해 μ£Όμ„Έμš”.
  3. ν•΄λ‹Ή App 의 App ID Prefix 와 Bundle ID λ₯Ό 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

Key 의 p8 μ—…λ‘œλ“œ

2272
  1. https://developer.apple.com/account/resources 의 Keys 둜 이동해 μ£Όμ„Έμš”.
  2. μ‚¬μš©ν•˜λŠ” Key λ₯Ό 클릭해 μ£Όμ„Έμš”.
  3. ν•΄λ‹Ή Key 의 Key ID 와 p8 을 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.

p8 은 ν•΄λ‹Ή Key 졜초 μƒμ„±μ‹œμ—λ§Œ λ‹€μš΄λ‘œλ“œ κ°€λŠ₯ν•©λ‹ˆλ‹€.

App μ„€μ •

Capabilities μΆ”κ°€

  1. Xcode > Project 파일 > Signing & Capabilities 둜 μ΄λ™ν•΄μ£Όμ„Έμš”.
  2. + Capability λ²„νŠΌμ„ ν΄λ¦­ν•΄μ£Όμ„Έμš”.
  3. Background Modes 와 Push Notifications λ₯Ό μΆ”κ°€ν•΄μ£Όμ„Έμš”.
  4. Background Modes 의 Remote notifications λ₯Ό μ²΄ν¬ν•΄μ£Όμ„Έμš”.

Slient Push Notification μ„€μ •

앱이 싀행될 λ•Œ, 기쑴에 Push Notification 을 μ‚¬μš©ν•˜κ³  μžˆμ§€ μ•Šμ•˜λ‹€λ©΄ registerForRemoteNotifications ν•¨μˆ˜λ₯Ό ν˜ΈμΆœν•΄ μ£Όμ„Έμš”.

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;
}

APNS Push Token 전솑

APNS Push Token 이 μƒμ„±λ˜μ—ˆμ„ λ•Œ, ν•΄λ‹Ή 토큰을 registerPushToken ν•¨μˆ˜λ₯Ό ν˜ΈμΆœν•˜μ—¬ SDK 에 μ „λ‹¬ν•΄μ£Όμ„Έμš”.

func application(_ application: UIApplication,
                 didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
{
    AirBridge.registerPushToken(deviceToken)
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    [AirBridge registerPushToken:deviceToken];
}

μ‚­μ œ 좔적 용 Silent push notification λ¬΄μ‹œ

μ‚­μ œ 좔적 용 Silent push notification 이 μ „λ‹¬λ˜μ—ˆμ„ λ•Œ, μ•„λž˜ μ½”λ“œμ™€ 같이 λ¬΄μ‹œν•΄μ£Όμ„Έμš”.

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;
    }
  
    ...
}

Troubleshooting

λͺ¨ν”Όμ–΄μŠ€ Push SDK Troubleshooting guide

λͺ¨ν”Όμ–΄μŠ€ Push SDK Troubleshooting guide: 링크