diff --git a/ios/RNFIRMessaging.m b/ios/RNFIRMessaging.m index a17d876c55f6b245793d1f0117a5128301cbaa37..c969cb3b127ad36af0bdb514c01eff2383b69d24 100644 --- a/ios/RNFIRMessaging.m +++ b/ios/RNFIRMessaging.m @@ -151,6 +151,7 @@ RCT_EXPORT_MODULE(); + (void)didReceiveLocalNotification:(UILocalNotification *)notification { NSMutableDictionary* data = [[NSMutableDictionary alloc] initWithDictionary: notification.userInfo]; [data setValue:@"local_notification" forKey:@"_notificationType"]; + [data setValue:@(RCTSharedApplication().applicationState == UIApplicationStateInactive) forKey:@"opened_from_tray"]; [[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:@{@"data": data}]; }