From 113c4f1c848edcf58a9884c69d979ccad46d6e44 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Wed, 14 Aug 2024 08:45:20 +0200 Subject: [PATCH] Display push notification while in the app --- Packages/Env/Sources/Env/PushNotificationsService.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Packages/Env/Sources/Env/PushNotificationsService.swift b/Packages/Env/Sources/Env/PushNotificationsService.swift index 17bb27a9..f271a6dd 100644 --- a/Packages/Env/Sources/Env/PushNotificationsService.swift +++ b/Packages/Env/Sources/Env/PushNotificationsService.swift @@ -154,6 +154,11 @@ extension PushNotificationsService: UNUserNotificationCenterDelegate { handledNotification = .init(account: account.account, notification: notification) } catch {} } + + public func userNotificationCenter(_ center: UNUserNotificationCenter, + willPresent notification: UNNotification) async -> UNNotificationPresentationOptions { + return [.banner, .sound] + } } extension Data {