From c9593cded6dd98595a62d1eb9c2d23deb8cb445b Mon Sep 17 00:00:00 2001 From: Anurag Kalavakunta Date: Tue, 11 Jun 2024 13:16:21 -0700 Subject: [PATCH] fix(iOS): Allow the original delegate to handle non-Notifee notifications first (#985) * fix(ios) allow the original delegate to handle non-Notifee notifications first * chore: update ios simulator to iPhone 15 --- .../NotifeeCore+UNUserNotificationCenter.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m b/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m index cf8020d8..e4019b18 100644 --- a/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +++ b/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m @@ -181,8 +181,13 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center // handle notification outside of notifee if (notifeeNotification == nil) { - notifeeNotification = - [NotifeeCoreUtil parseUNNotificationRequest:response.notification.request]; + if (_originalDelegate != nil && originalUNCDelegateRespondsTo.didReceiveNotificationResponse) { + [_originalDelegate userNotificationCenter:center + didReceiveNotificationResponse:response + withCompletionHandler:completionHandler]; + } else { + notifeeNotification = [NotifeeCoreUtil parseUNNotificationRequest:response.notification.request]; + } } if (notifeeNotification != nil) { @@ -247,11 +252,6 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center completionHandler(); }); - } else if (_originalDelegate != nil && - originalUNCDelegateRespondsTo.didReceiveNotificationResponse) { - [_originalDelegate userNotificationCenter:center - didReceiveNotificationResponse:response - withCompletionHandler:completionHandler]; } }