From 4ca641228c4e4fda6c3115ec45bf8ae62054b0ff Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Silva Date: Tue, 19 Mar 2024 16:46:30 -0300 Subject: [PATCH] regression: disable notifiee handler on ios devices (#5619) * chore: test ios push * revert notifications * fix: disable notifiee handler on ios devices * chore: fix notifee version * chore: update notifee lib --- ios/Podfile.lock | 8 +++---- package.json | 2 +- ...atch => @notifee+react-native+7.8.2.patch} | 21 +++++++++++++++++++ yarn.lock | 8 +++---- 4 files changed, 30 insertions(+), 9 deletions(-) rename patches/{@notifee+react-native+7.8.0.patch => @notifee+react-native+7.8.2.patch} (50%) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1ba319c09..d67fe6338 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -534,10 +534,10 @@ PODS: - React-Core - RNMathView (1.0.0): - iosMath - - RNNotifee (7.8.0): + - RNNotifee (7.8.2): - React-Core - - RNNotifee/NotifeeCore (= 7.8.0) - - RNNotifee/NotifeeCore (7.8.0): + - RNNotifee/NotifeeCore (= 7.8.2) + - RNNotifee/NotifeeCore (7.8.2): - React-Core - RNReanimated (2.8.0): - DoubleConversion @@ -980,7 +980,7 @@ SPEC CHECKSUMS: RNImageCropPicker: 97289cd94fb01ab79db4e5c92938be4d0d63415d RNLocalize: 82a569022724d35461e2dc5b5d015a13c3ca995b RNMathView: 4c8a3c081fa671ab3136c51fa0bdca7ffb708bd5 - RNNotifee: f3c01b391dd8e98e67f539f9a35a9cbcd3bae744 + RNNotifee: 8e2d3df3f0e9ce8f5d1fe4c967431138190b6175 RNReanimated: 64573e25e078ae6bec03b891586d50b9ec284393 RNRootView: 895a4813dedeaca82db2fa868ca1c333d790e494 RNScreens: fa9b582d85ae5d62c91c66003b5278458fed7aaa diff --git a/package.json b/package.json index 3efb1d30c..5ce432444 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@codler/react-native-keyboard-aware-scroll-view": "^2.0.1", "@gorhom/bottom-sheet": "^4.3.1", "@hookform/resolvers": "^2.9.10", - "@notifee/react-native": "^7.8.0", + "@notifee/react-native": "7.8.2", "@nozbe/watermelondb": "0.23.0", "@react-native-async-storage/async-storage": "^1.17.11", "@react-native-camera-roll/camera-roll": "5.6.1", diff --git a/patches/@notifee+react-native+7.8.0.patch b/patches/@notifee+react-native+7.8.2.patch similarity index 50% rename from patches/@notifee+react-native+7.8.0.patch rename to patches/@notifee+react-native+7.8.2.patch index 04bfbe16c..cdb17b785 100644 --- a/patches/@notifee+react-native+7.8.0.patch +++ b/patches/@notifee+react-native+7.8.2.patch @@ -18,3 +18,24 @@ Notifee.REQUEST_CODE_NOTIFICATION_PERMISSION, this); } +diff --git a/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m b/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +index cf8020d..3a1e080 100644 +--- a/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m ++++ b/node_modules/@notifee/react-native/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +@@ -179,11 +179,11 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center + + _notificationOpenedAppID = notifeeNotification[@"id"]; + +- // handle notification outside of notifee +- if (notifeeNotification == nil) { +- notifeeNotification = +- [NotifeeCoreUtil parseUNNotificationRequest:response.notification.request]; +- } ++ // disable notifee handler on ios devices ++ // if (notifeeNotification == nil) { ++ // notifeeNotification = ++ // [NotifeeCoreUtil parseUNNotificationRequest:response.notification.request]; ++ // } + + if (notifeeNotification != nil) { + if ([response.actionIdentifier isEqualToString:UNNotificationDismissActionIdentifier]) { diff --git a/yarn.lock b/yarn.lock index 3abd0c30d..4f74d81f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5158,10 +5158,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@notifee/react-native@^7.8.0": - version "7.8.0" - resolved "https://registry.yarnpkg.com/@notifee/react-native/-/react-native-7.8.0.tgz#2990883753990f3585aa0cb5becc5cbdbcd87a43" - integrity sha512-sx8h62U4FrR4pqlbN1rkgPsdamDt9Tad0zgfO6VtP6rNJq/78k8nxUnh0xIX3WPDcCV8KAzdYCE7+UNvhF1CpQ== +"@notifee/react-native@7.8.2": + version "7.8.2" + resolved "https://registry.yarnpkg.com/@notifee/react-native/-/react-native-7.8.2.tgz#72d3199ae830b4128ddaef3c1c2f11604759c9c4" + integrity sha512-VG4IkWJIlOKqXwa3aExC3WFCVCGCC9BA55Ivg0SMRfEs+ruvYy/zlLANcrVGiPtgkUEryXDhA8SXx9+JcO8oLA== "@nozbe/simdjson@0.9.6-fix2": version "0.9.6-fix2"