feat(mobile): migrate push notifications to notifee + firebase/messaging (stacked on rn-package-upgrades)#14506
Conversation
Replace the abandoned react-native-notifications (Wix) with
@notifee/react-native + @react-native-firebase/messaging + app.
- Rewrite notifications.ts PushNotifications singleton:
- remote token via messaging().getToken() / onTokenRefresh()
- permissions via messaging().requestPermission() (Android 13+ still
requests POST_NOTIFICATIONS via react-native-permissions)
- opened-handling via onNotificationOpenedApp() + getInitialNotification()
- badge counts via notifee.setBadgeCount()
- local notification cancel via notifee.cancelNotification()
- FCM data values arrive as strings on both platforms, so the
Android string-parsing is now applied unconditionally
- iOS AppDelegate.mm: drop Wix RNNotifications, add #import <Firebase.h>
and [FIRApp configure] in didFinishLaunchingWithOptions
- Android MainApplication.kt: remove dead Wix RNNotificationsPackage import
- Podfile: opt GoogleUtilities/nanopb into modular headers so the Firebase
Swift pods integrate as static libraries
- pod install integrates Firebase 12.10 / RNFB 24.1 / RNNotifee 9.1
(GoogleService-Info.plist and google-services.json already present)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
Dependency limit exceeded — report not shown. This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report. Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard. Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account. |
Stacked on
feat/rn-package-upgrades(Groups 1 & 2 of the RN upgrade). Base this on the parent branch, notmain.Group 3 — Wix notifications → notifee + firebase/messaging
Replaces the abandoned
react-native-notifications(Wix) with@notifee/react-native+@react-native-firebase/messaging+@react-native-firebase/app.JS
notifications.tsPushNotificationssingleton, mapping each responsibility:messaging().getToken()+messaging().onTokenRefresh()(persisted to AsyncStorage as before)messaging().requestPermission()(Android 13+ still requestsPOST_NOTIFICATIONSviareact-native-permissions)messaging().onNotificationOpenedApp()+getInitialNotification()notifee.setBadgeCount()notifee.cancelNotification(id)/cancelAllNotifications()RemoteMessage.datadatavalues as strings on both platforms, so the numeric/JSON re-parsing (previously Android-only) now runs unconditionallyNative
AppDelegate.mm: removed WixRNNotifications(import +startMonitorNotifications+ the remote-notification delegate methods, which Firebase now swizzles), added#import <Firebase.h>and[FIRApp configure].MainApplication.kt: removed the dead Wix package import (Android already hadfirebase-bom+firebase-messaging+ thegoogle-servicesplugin).Podfile: optedGoogleUtilities/nanopbinto modular headers so the Firebase Swift pods integrate as static libraries (the project links pods statically by default — avoids switching the whole app touse_frameworks!).GoogleService-Info.plistand allgoogle-services.jsonwere already present.Build verification
pod install(vianpm i, new arch stays off) integrates Firebase 12.10 / RNFB 24.1 / RNNotifee 9.1.AudiusReactNativescheme,Debug) — BUILD SUCCEEDED.Group 4 (Reanimated 4) — intentionally deferred
Reanimated 4 is New-Architecture-only (official migration guide: it "supports only the New Architecture and drops support for the Legacy Architecture … entirely"). This app still runs on the old architecture (
newArchEnabled=false, pods built withRCT_NEW_ARCH_ENABLED=0), and the team's ownREACT_NATIVE_UPGRADE_PLAN.mdsequences enabling New Arch at the 0.81 → 0.82 bump before the Reanimated 4 cluster. So Reanimated 4 (and the new-arch-onlyscreens@latest/pager-view@8/flash-list@2/gesture-handler@3majors) can't build on this branch and will land with the 0.82/new-arch step.Notes / follow-ups
deviceType: ios, or this needs a backend change before rollout.🤖 Generated with Claude Code