Skip to content

v9.1.20

Choose a tag to compare

@marcocrupi marcocrupi released this 07 Apr 15:38
· 487 commits to main since this release

Fixed

  • iOS: willPresentNotification: fallback no longer silently drops foreground notifications when no original UNUserNotificationCenterDelegate was captured. The fallback path (taken when the incoming notification is not Notifee-owned and _originalDelegate == nil) previously called completionHandler(UNNotificationPresentationOptionNone), which told iOS to display nothing — no banner, no sound, no badge, no Notification Center entry. It now returns the platform default presentation options (banner, sound, list, badge on iOS 14+; alert, sound, badge on earlier), matching what iOS would do if Notifee had not installed a delegate at all. This affects apps using react-native-notify-kit without a library that also sets a UNUserNotificationCenter delegate — for example, apps without @react-native-firebase/messaging, or apps using a different push provider (OneSignal, AWS SNS, etc.). Apps using RN Firebase are unaffected: Firebase's delegate is captured as _originalDelegate at +load time and the forwarding branch is taken instead of the fallback. Note: this is not a duplicate of the v9.1.12 fix — v9.1.12 addressed a separate bug where the completionHandler was not called at all in that branch (causing handler leaks). v9.1.12 added the call with a value of None, which fixed the leak but left notifications silently dropped. This release changes the value passed to completionHandler, not whether it is called.

  • iOS: Resolved upstream issue invertase/notifee#828 — "All notifications are dismissed when the app is opened". Verified on a real iOS device with react-native-notify-kit: with the app killed, four FCM push notifications were sent in sequence, all four appeared in Notification Center, the app was opened by tapping its icon (not by tapping a notification), and after backgrounding the app all four notifications were still present and intact. The bug was likely addressed incrementally by the cumulative iOS fixes in this fork — the delegate hijacking and capture work, the v9.1.12 completionHandler fixes in willPresentNotification: and didReceiveNotificationResponse:, the iOS 16+ badge management via setBadgeCount:, and the most recent fix to the willPresentNotification: fallback path that previously returned UNNotificationPresentationOptionNone. The original upstream @notifee/react-native@9.1.8 has not received updates since December 2024; users affected by #828 can resolve it by switching to react-native-notify-kit.

Full Changelog: https://github.com/marcocrupi/react-native-notify-kit/blob/main/CHANGELOG.md

yarn add react-native-notify-kit@9.1.20