diff --git a/ios/RNFirebase/messaging/RNFirebaseMessaging.m b/ios/RNFirebase/messaging/RNFirebaseMessaging.m index 36294b79..226b30a9 100644 --- a/ios/RNFirebase/messaging/RNFirebaseMessaging.m +++ b/ios/RNFirebase/messaging/RNFirebaseMessaging.m @@ -45,6 +45,12 @@ RCT_ENUM_CONVERTER(NSCalendarUnit, content.userInfo = details; content.badge = [RCTConvert NSNumber:details[@"badge"]]; + if([details objectForKey:@"show_in_foreground"] != nil) { + if([(NSNumber *)details[@"show_in_foreground"] boolValue] == YES) { + [content setValue:@YES forKeyPath:@"shouldAlwaysAlertWhileAppIsForeground"]; + } + } + NSDate *fireDate = [RCTConvert NSDate:details[@"fire_date"]]; if(fireDate == nil){