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/resourcesIdentifiers로 이동해 주세요.

    2. Uninstall Tracking 하고자하는 앱의 Identifier를 클릭하여 Push Notifications를 체크해 주세요.

    Key 에서 Push Notification 켜기

    1. https://developer.apple.com/account/resourcesKeys로 이동해 주세요.

    2. 사용하는 Key 를 edit 하여 Apple Push Notification service를 체크해 주세요.

    사용하는 Key 가 없는 경우 + 버튼을 눌러 새로 생성하고 p8 을 다운로드 해주세요.

    App 정보 등록

    App ID Prefix 및 Bundle ID 등록

    1. https://developer.apple.com/account/resourcesIdentifiers로 이동해 주세요.

    2. Uninstall Tracking 하고자하는 App 의 Identifier를 클릭해 주세요.

    3. 해당 App 의 App ID PrefixBundle ID를 확인할 수 있습니다.

    Key 의 p8 업로드

    1. https://developer.apple.com/account/resourcesKeys로 이동해 주세요.

    2. 사용하는 Key를 클릭해 주세요.

    3. 해당 KeyKey IDp8을 확인할 수 있습니다.

    p8 은 해당 Key 최초 생성시에만 다운로드 가능합니다.

    App 설정

    Capabilities 추가

    1. Xcode > Project 파일 > Signing & Capabilities 로 이동해주세요.

    2. + Capability버튼을 클릭해주세요.

    3. Background ModesPush Notifications를 추가해주세요.

    4. Background ModesRemote notifications를 체크해주세요.

    Slient Push Notification 설정

    앱이 실행될 때, 기존에 Push Notification 을 사용하고 있지 않았다면 registerForRemoteNotifications 함수를 호출해 주세요.

    1234567
    func application(_ application: UIApplication,
                     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool
    {
        ...
        UIApplication.shared.registerForRemoteNotifications()
        ...
    }

    APNS Push Token 전송

    APNS Push Token 이 생성되었을 때, 해당 토큰을 registerPushToken 함수를 호출하여 SDK 에 전달해주세요.

    12345
    func application(_ application: UIApplication,
                     didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
    {
        AirBridge.registerPushToken(deviceToken)
    }

    삭제 추적 용 Silent push notification 무시

    삭제 추적 용 Silent push notification 이 전달되었을 때, 아래 코드와 같이 무시해주세요.

    12345678910
    func application(_ application: UIApplication,
                     didReceiveRemoteNotification userInfo: [AnyHashable : Any],
                     fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)
    {
        if userInfo["airbridge-uninstall-tracking"] as? Bool == true {
            return;
        }
      
        ...
    }

    Troubleshooting

    모피어스 Push SDK Troubleshooting guide

    모피어스 Push SDK Troubleshooting guide: 링크

    이 페이지가 도움이 되었나요?