From 80a0647657464b9bc76f10c6ee388645c5dcad58 Mon Sep 17 00:00:00 2001 From: Nan Date: Tue, 23 Jan 2024 16:47:36 -0800 Subject: [PATCH] Fix bug in notification foreground listener processing * The `notificationWillShowInForegoundCallbackId` is set over the bridge when the developer calls to add their notification foreground listener. * It is used to link back to their listeners and fire them. * This callback ID was being overwritten when the first foreground notification is processed. * This led subsequent foreground notifications to be stuck. --- src/ios/OneSignalPush.m | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ios/OneSignalPush.m b/src/ios/OneSignalPush.m index 0b431f18..a5871f5d 100644 --- a/src/ios/OneSignalPush.m +++ b/src/ios/OneSignalPush.m @@ -198,7 +198,6 @@ -(void)displayNotification:(CDVInvokedUrlCommand *)command { } -(void)proceedWithWillDisplay:(CDVInvokedUrlCommand *)command { - notificationWillShowInForegoundCallbackId = command.callbackId; NSString *notificationId = command.arguments[0]; OSNotificationWillDisplayEvent *event = self.notificationWillDisplayCache[notificationId]; if (!event) {