TL;DR: React Native and Expo push notifications with PushFire need a real FCM token, so today you use React Native Firebase messaging on the device. In Expo that means a development build, not Expo Go. Your app sends the token to /register-device with a Public key and calls /login-subscriber when the user signs in. Your server, or a visual workflow, then sends push and email by your own user ID. A dedicated React Native package is planned; the code below uses plain fetch and works today.
React Native and Expo push notifications are mostly plumbing: permissions, tokens, refresh, and a backend that knows which token belongs to which user. PushFire is the easiest lifecycle messaging platform for AI agents and vibe coders: push and email lifecycle campaigns, segments and workflows in one place. This guide covers a bare React Native app and an Expo app, shows the device code step by step, and then shows how to send. For the bigger picture, see what a lifecycle messaging platform does for an app team.
What you need
- A Firebase project with your iOS and Android apps added, and the APNs key uploaded in Firebase for iOS.
- A PushFire project with the Firebase service account uploaded. Start free at console.pushfire.app.
- A Public key (pf_pk_...) for the app. Public keys can only register devices, log in subscribers and manage tags, so they are safe to ship. See Public and Secret keys.
- A bare React Native app, or an Expo app that uses a development build.
Install React Native Firebase messaging
For iOS, add the Push Notifications capability and Background Modes with Remote notifications in Xcode.
Expo push notifications: what works today
Why an Expo push token does not work with PushFire
expo-notifications offers getExpoPushTokenAsync(), which returns an ExpoPushToken. That token addresses Expo's own push service, so only Expo's servers can send to it. PushFire delivers through Firebase Cloud Messaging and needs an FCM registration token. Expo's getDevicePushTokenAsync() returns the native token instead, but on iOS that is an APNs token, not an FCM token. React Native Firebase messaging returns an FCM token on both platforms, so it is the reliable choice today.
Why Expo Go is not enough
React Native Firebase contains native code that is not compiled into Expo Go, so it cannot run there. You need a development build: your own build of the app that includes the native modules, plus expo-dev-client for the fast reload loop. Store builds work the same way.
Set up an Expo development build step by step
- Install the modules with Expo's installer so versions match your SDK:
- Download google-services.json (Android) and GoogleService-Info.plist (iOS) from your Firebase project and put them in the project root.
- Add the config plugins and files to app.json. React Native Firebase requires dynamic frameworks on iOS, set through expo-build-properties:
The messaging plugin only edits the Android manifest, so set the iOS entitlement and background mode as shown, and upload your APNs key in Firebase.
- Build. To compile on your own machine:
To build in the cloud with EAS Build:
If an older development build is on the device, uninstall it first: it lacks the new native code.
Can I still use expo-notifications?
Yes, for display and handling. With React Native Firebase, a notification that arrives while the app is in the foreground is not shown as a banner by default. Many apps show it themselves with a local notification from expo-notifications or Notifee. Just do not use its Expo push token for PushFire.
How to set up React Native and Expo push notifications step by step
The device flow has four steps: ask for permission, get the FCM token, register it once, and keep it current. PushFire rejects a duplicate FCM token on /register-device, so store the returned deviceId and use /update-device after that.
Call initPush() once at startup, for example in a root useEffect, and keep the returned unsubscribe function.
Identify the user after sign-in
A new device starts as an anonymous subscriber. When the user signs in, attach the device to your own user ID. That ID is what your backend uses to send.
On sign-out, call logout-subscriber with the same deviceId and subscriberId, and store the new anonymous subscriberId it returns.
Tag users for segments
Tags drive segments and workflow conditions. Create the tag in the console and copy its UUID:
How do you send React Native push notifications from a server?
Keep the Secret key on a server. Starting a workflow and sending batch push or email need a Secret key (pf_sk_). A Public key (pf_pk_) gets HTTP 403 on those calls. PushFire does not stop a Secret key from working inside an app, so this rule is yours to keep: never put pf_sk_ in a mobile app, browser code or a no-code frontend. Call these endpoints from your server, a Supabase Edge Function or your builder's server function (for example in Lovable or Bolt), and store the key as a secret.
Sending is a server job, because it needs a Secret key (pf_sk_). Your backend calls /send-batch-push-notifications with your own user IDs, the same IDs you passed as externalId in the app. PushFire finds every device for those users and delivers through FCM, which hands iOS messages to APNs. The data object reaches your app with the message, so you can deep-link on tap. For campaigns that span days, build a workflow in the console instead: a push on signup, a wait node, a condition on a tag, then an email to people who did not come back. Your server starts it with /create-workflow-execution, or you run it as a broadcast from the console. This split keeps your app thin. The React Native code only registers and identifies, and every message decision lives on the server or in the console, where you can change it without shipping a new build. The Node.js guide has the server code.
A minimal server call:
Lifecycle email automation for React Native apps
Because login-subscriber stores the user's email, the same subscriber can get email from a workflow. Connect Resend or SMTP in the console, design a layout, and add email nodes next to your push nodes. A common pattern: push first, and email only users who have notifications turned off.
Let an AI agent write the integration
If Claude Code, Cursor or Codex builds your app, run npx skills add https://www.pushfire.app first, so the agent uses the right endpoints and key types. The PushFire MCP server is live too, so an agent can also build your segments and workflows.
Frequently asked questions
Can I use PushFire with Expo?
Yes, with a development build or a store build. React Native Firebase is native code, so it does not run in Expo Go. Add its config plugins and expo-build-properties with dynamic iOS frameworks to app.json, then build with npx expo run or EAS Build. The PushFire calls are plain fetch and need no native setup.
Why can't I use my Expo push token?
An Expo push token addresses Expo's push service, so only Expo's servers can deliver to it. PushFire sends through Firebase Cloud Messaging and needs an FCM token. On iOS, Expo's native device token is an APNs token, not FCM. React Native Firebase messaging gives you an FCM token on both iOS and Android.
Which PushFire key goes in my React Native app?
Ship only a Public key that starts with pf_pk_. It can register devices, log in subscribers and manage tags, and the server enforces that limit. Sending push, sending email and starting workflows need a Secret key, which must stay on your backend and never appear in the app bundle.
What happens when the FCM token changes?
FCM can rotate the token after a reinstall, a restore or a data clear. Listen with onTokenRefresh and call /update-device with the stored device ID and the new token. Do not call /register-device again for the same install, because PushFire rejects duplicate tokens and you would create an orphaned device.
Is there an official React Native SDK?
A dedicated React Native package is planned. Today you can use the fetch helper in this guide, which calls the same REST endpoints a package would. The npm pushfire package exists for JavaScript and is being updated. When the dedicated package ships, the endpoints and payloads in this guide stay the same.
Ship React Native and Expo push notifications today
Create a free project at console.pushfire.app. The Free plan covers up to 5,000 subscribers with push workflows. Copy a Public key into your app, paste the helper above, and send your first test push from the console. The step-by-step React Native guide and the API reference cover every endpoint.
