Skip to content

Commit

Permalink
feat(messaging): allow messaging services to hook into FCM (invertase…
Browse files Browse the repository at this point in the history
…#4087)

* feat(messaging): hook into FCM

* chore(messaging): update event name
  • Loading branch information
russellwheatley authored Aug 14, 2020
1 parent 3fd0e8c commit 41c6598
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ios/RNFBMessaging/RNFBMessaging+AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41c6598

Please sign in to comment.