Skip to content

feat(mobile): migrate push notifications to notifee + firebase/messaging (stacked on rn-package-upgrades)#14506

Open
dylanjeffers wants to merge 1 commit into
feat/rn-package-upgradesfrom
feat/rn-package-upgrades-notifications
Open

feat(mobile): migrate push notifications to notifee + firebase/messaging (stacked on rn-package-upgrades)#14506
dylanjeffers wants to merge 1 commit into
feat/rn-package-upgradesfrom
feat/rn-package-upgrades-notifications

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Stacked on feat/rn-package-upgrades (Groups 1 & 2 of the RN upgrade). Base this on the parent branch, not main.

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

  • Rewrote notifications.ts PushNotifications singleton, mapping each responsibility:
    • Remote token → messaging().getToken() + messaging().onTokenRefresh() (persisted to AsyncStorage as before)
    • Permissions → messaging().requestPermission() (Android 13+ still requests POST_NOTIFICATIONS via react-native-permissions)
    • Opened (background/quit) → messaging().onNotificationOpenedApp() + getInitialNotification()
    • Badge counts → notifee.setBadgeCount()
    • Local cancel → notifee.cancelNotification(id) / cancelAllNotifications()
    • Campaign open-tracking preserved, now reading firebase's RemoteMessage.data
    • FCM delivers data values as strings on both platforms, so the numeric/JSON re-parsing (previously Android-only) now runs unconditionally
  • Typecheck + lint clean.

Native

  • iOS AppDelegate.mm: removed Wix RNNotifications (import + startMonitorNotifications + the remote-notification delegate methods, which Firebase now swizzles), added #import <Firebase.h> and [FIRApp configure].
  • Android MainApplication.kt: removed the dead Wix package import (Android already had firebase-bom + firebase-messaging + the google-services plugin).
  • Podfile: opted GoogleUtilities/nanopb into modular headers so the Firebase Swift pods integrate as static libraries (the project links pods statically by default — avoids switching the whole app to use_frameworks!).
  • GoogleService-Info.plist and all google-services.json were already present.

Build verification

  • pod install (via npm i, new arch stays off) integrates Firebase 12.10 / RNFB 24.1 / RNNotifee 9.1.
  • ✅ iOS simulator build (AudiusReactNative scheme, 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 with RCT_NEW_ARCH_ENABLED=0), and the team's own REACT_NATIVE_UPGRADE_PLAN.md sequences enabling New Arch at the 0.81 → 0.82 bump before the Reanimated 4 cluster. So Reanimated 4 (and the new-arch-only screens@latest/pager-view@8/flash-list@2/gesture-handler@3 majors) can't build on this branch and will land with the 0.82/new-arch step.

Note: the original plan text said install react-native-worklets-core, but Reanimated 4 actually requires react-native-worklets with the react-native-worklets/plugin Babel plugin — captured for the future 0.82 work.

Notes / follow-ups

  • Backend device-token routing: iOS now registers an FCM token (was an APNs token under Wix). Confirm the backend push path accepts FCM tokens for deviceType: ios, or this needs a backend change before rollout.

🤖 Generated with Claude Code

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>
@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b80c37c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant