백그라운드 알림 전달 | Push | Appbox iOS SDK 가이드

백그라운드 알림 전달

백그라운드 또는 silent Push의 payload를 SDK에 전달합니다.

백그라운드 알림 전달

AppBox.handleRemoteNotification(userInfo: [AnyHashable: Any])

Swift
1 func application(
2 _ application: UIApplication,
3 didReceiveRemoteNotification userInfo: [AnyHashable: Any],
4 fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
5 ) {
6 AppBox.handleRemoteNotification(userInfo: userInfo)
7 completionHandler(.newData)
8 }
1 - (void)application:(UIApplication *)application
2 didReceiveRemoteNotification:(NSDictionary *)userInfo
3 fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
4 [AppBox handleRemoteNotificationUserInfo:userInfo];
5 completionHandler(UIBackgroundFetchResultNewData);
6 }

Request 항목 정의

Request 항목필수여부설명기본값
userInfo필수AppDelegate가 받은 원격 알림 payload-

Response 항목 정의

Response 결과값
없음반환값과 SDK callback이 없습니다


시스템의 fetchCompletionHandler는 앱에서 반드시 호출합니다. 같은 알림 payload를 여러 lifecycle 경로에서 중복 전달하지 않습니다. payload 전체를 운영 로그에 출력하지 않습니다.

AppDelegate 연결 예제는 AppBoxSampleiOS에서 확인할 수 있습니다.

www.naver.com
QR 코드를 촬영하면 입력하신 주소의
앱 예시 화면을 테스트할 수 있습니다.
* 스캔 후 바로 앱 다운로드 이동합니다.