diff --git a/ios/csareactrn60/AppDelegate.mm b/ios/csareactrn60/AppDelegate.mm index 3704cd3..2a92ecd 100644 --- a/ios/csareactrn60/AppDelegate.mm +++ b/ios/csareactrn60/AppDelegate.mm @@ -89,4 +89,13 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response completionHandler(); } +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [FIRMessaging messaging].APNSToken = deviceToken; +} + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { + [[FIRMessaging messaging] appDidReceiveMessage:userInfo]; + completionHandler(UIBackgroundFetchResultNoData); +} + @end