react-native-notify-kit 10.0.0 - FCM Mode is here! #11
marcocrupi
announced in
Announcements
Replies: 1 comment 1 reply
-
|
Great to hear that! Removing Android notification field in favor data-only notification and iOS APS 'alert' field composed on server were the only ways to achieve notifications delivery reliability, until now :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What was broken before
If you've ever tried to use
@notifee/react-native(or this fork) as the display layer for Firebase Cloud Messaging, you've hit one of these two walls:Wall 1: duplicate notifications.
You send an FCM
notificationpayload. The OS auto-displays it via the FCM SDK. Then yoursetBackgroundMessageHandlerfires and callsdisplayNotification()— and now the user sees the same push twice. Every. Single. Time.Wall 2: silent-push drops.
OK, so you switch to FCM
data-only payloads. No more duplicates on Android. But now iOS treats every push as a silent / background push — and Apple throttles those aggressively. In production, on real devices, you lose 30–60% of your pushes. Low Power Mode? Worse. App force-quit? Worse. Your users never see the notification and you have no idea why.There was no third option. You either duplicated or dropped. Forty-plus people asked for a fix over the years on
invertase/notifee#129, and the issue was closednot planned.This release is that third option.
What's new in 10.0.0
Notifee FCM Mode — use
react-native-notify-kitas the sole display layer for FCM pushes on both Android and iOS, with no duplicates and no silent-push drops. One developer API hides the platform asymmetry.The trick: it sends a different FCM payload shape per platform under the hood.
mutable-content: 1→ APNs delivers it reliably (~99%, not silent-push throttled), and a Notification Service Extension reads the samenotifee_optionsblob and applies your styling before the OS draws it.What you get
buildNotifyKitPayload(input)fromreact-native-notify-kit/server. Zero runtime deps, works in Node.js and Firebase Cloud Functions.notifee.handleFcmMessage(remoteMessage). One line insetBackgroundMessageHandler/onMessage.npx react-native-notify-kit init-nsescaffolds the iOS Notification Service Extension (Swift), patches your Podfile, wires.pbxproj. No more manual Xcode ceremony, no more bridging header hunts.Quick start
Full guide:
docs/fcm-mode.md.Backward compatibility
FCM Mode is opt-in. If you have an existing integration that calls
displayNotification()manually fromonMessage, it keeps working exactly the same after upgrading to 10.0.0. Migrate when you're ready, not because you have to.Breaking changes
react-native-notify-kit/package.jsonnow declares anexportsmap. For backward compatibility,./src/*and./dist/*internal paths remain exposed but are deprecated and will be removed in a future major. Migrate to the public entries (react-native-notify-kit,react-native-notify-kit/server).See the CHANGELOG for the full list.
Credits
To everyone who reacted 👍 on
invertase/notifee#129, this release is for you.Feedback
Try it out and let me know what breaks. Open an issue for bugs, reply here for design questions or use cases.
Beta Was this translation helpful? Give feedback.
All reactions