fix: duplicate foreground notification on iOS#7391
Merged
Conversation
|
🧪 Flashlight Performance Report (AWS Device Farm) 🔀 Commit: 551a1fc
|
Contributor
janicduplessis
left a comment
There was a problem hiding this comment.
Should we return [] instead of badge + list so it matches what we had before? It seems to be the default in the firebase library, unless we're passing messaging_ios_foreground_presentation_options?
Contributor
Author
Good catch. Pushed fix |
janicduplessis
approved these changes
Apr 27, 2026
ibrahimtaveras00
approved these changes
Apr 27, 2026
Contributor
ibrahimtaveras00
left a comment
There was a problem hiding this comment.
Looks good, QA Passed 👍🏽
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After bumping
@react-native-firebase/*from 20.1.0 to 23.8.8 in #7319 (Apr 2026), iOS users see both a system banner AND a notifee-displayed local notification when a push arrives while the app is foregrounded. Pre-bump behavior was the notifee notification only.The cause is upstream: invertase/react-native-firebase#8786 (merged Feb 2026, shipped in v23.8.5) reordered RNFB's iOS
willPresentdelegate so the original AppDelegate handler is called first. Previously, RNFB consumed the one-shotcompletionHandlerwith its own default options (empty, since we don't have afirebase.json) before forwarding to AppDelegate, making AppDelegate'scompletionHandler([.sound, .badge, .list, .banner])a no-op. With the new order, AppDelegate wins and iOS now honors the full[.sound, .badge, .list, .banner]set the handler has been quietly asking for since #6607 (Aug 2025).This change updates AppDelegate's
willPresentto callcompletionHandler([]), which suppresses all iOS-side presentation for the FCM remote when foregrounded. Rainbow's user-visible foreground notification UI is rendered by notifee from the separateonMessageJS handler (src/notifications/foregroundHandler.ts→notifee.displayNotification). Letting iOS also present the FCM payload would duplicate Notification Center entries and add badge increments that pre-bump prod never had. Returning[]matches the pre-RNFB-23.8.5 default ofUNNotificationPresentationOptionNone. Background and killed-app notifications are unaffected since this delegate only runs in the foreground case.