From 41c659843771a53058f64f7c9602a246b19682e8 Mon Sep 17 00:00:00 2001 From: Russell Wheatley Date: Fri, 14 Aug 2020 14:55:12 +0100 Subject: [PATCH] feat(messaging): allow messaging services to hook into FCM (#4087) * feat(messaging): hook into FCM * chore(messaging): update event name --- ios/RNFBMessaging/RNFBMessaging+AppDelegate.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m b/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m index 1a556a22b2..4b36340b80 100644 --- a/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m +++ b/ios/RNFBMessaging/RNFBMessaging+AppDelegate.m @@ -107,6 +107,8 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N } #endif + [[NSNotificationCenter defaultCenter] postNotificationName:@"RNFBMessagingDidReceiveRemoteNotification" object:userInfo]; + if (userInfo[@"gcm.message_id"]) { if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) { // TODO add support in a later version for calling completion handler directly from JS when user JS code complete