From 31592663c4c96641cc43593ac942b38dc39dbd52 Mon Sep 17 00:00:00 2001 From: Ole Birk Rasmussen <1476509+olerass@users.noreply.github.com> Date: Mon, 27 Apr 2026 14:27:18 +0200 Subject: [PATCH 1/2] fix(notifications): duplicate foreground notification on iOS --- ios/AppDelegate.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/AppDelegate.swift b/ios/AppDelegate.swift index d26836fbbda..5a0d6a77906 100644 --- a/ios/AppDelegate.swift +++ b/ios/AppDelegate.swift @@ -87,7 +87,9 @@ class AppDelegate: ExpoAppDelegate, UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - completionHandler([.sound, .badge, .list, .banner]) + // Suppress system banner and sound when foregrounded; in-app toast handles user-visible feedback. + // .list + .badge keep the notification in Notification Center and update the app icon badge. + completionHandler([.list, .badge]) } override func application(_ app: UIApplication, open url: URL, From 264ff9a24c2bf90063ed1e02ea68eff00b4bcf5e Mon Sep 17 00:00:00 2001 From: Ole Birk Rasmussen <1476509+olerass@users.noreply.github.com> Date: Mon, 27 Apr 2026 23:27:20 +0200 Subject: [PATCH 2/2] address comments --- ios/AppDelegate.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/AppDelegate.swift b/ios/AppDelegate.swift index 5a0d6a77906..b3edfa5182e 100644 --- a/ios/AppDelegate.swift +++ b/ios/AppDelegate.swift @@ -87,9 +87,10 @@ class AppDelegate: ExpoAppDelegate, UNUserNotificationCenterDelegate { func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - // Suppress system banner and sound when foregrounded; in-app toast handles user-visible feedback. - // .list + .badge keep the notification in Notification Center and update the app icon badge. - completionHandler([.list, .badge]) + // Suppress all iOS-side presentation for the FCM remote when foregrounded. + // Rainbow's foreground notification UI is handled by notifee (see foregroundHandler.ts); + // letting iOS also present from the FCM payload would duplicate Notification Center entries. + completionHandler([]) } override func application(_ app: UIApplication, open url: URL,