React Native push notifications look like one feature and are really four systems in a trench coat: Apple’s APNs, Google’s FCM, a library on the device, and a server of yours that has to remember which token belongs to whom. This guide walks through the whole path in 2026, with working code for expo-notifications (58.1.10), the Expo push service, and the direct route through FCM and APNs with React Native Firebase (27.2.0). It also covers the parts that tutorials skip: Android 13 permissions, token cleanup, what happens when the app is killed, and what changes when the notifications are chat messages.
Versions checked on npm on November 30, 2026, on React Native 0.88.1 and Expo SDK 58. The APIs below are stable, but check the changelogs before you copy a config plugin.
The short answer
- Expo app, or bare app with Expo modules: use
expo-notificationson the device. It has about 9.6 million downloads a week, handles permissions, tokens, channels, foreground behaviour and tap handling, and it does not lock you into Expo’s servers. - You want the least server work: send through the Expo push service. One HTTPS endpoint and one token format for both platforms.
- You need every FCM and APNs feature, or you already run Firebase: go direct. Use
getDevicePushTokenAsync()from expo-notifications, or@react-native-firebase/messaging, and send withfirebase-admin. - Marketing wants segments, journeys and A/B tests: a hosted product such as OneSignal (
react-native-onesignal5.6.0) is cheaper than building that yourself. - Do not start a new app on
react-native-push-notification. Its last release was in October 2021.
How push notifications in React Native actually work
Your app never talks to another phone. On iOS the operating system keeps one connection to Apple Push Notification service (APNs); on Android, Google Play services keeps one to Firebase Cloud Messaging (FCM). The flow is the same on both:
- The app asks the user for permission, then asks the OS for a device token.
- The app sends that token to your server, which stores it next to the user.
- When something happens, your server sends a message and the token to APNs or FCM (or to a service that does it for you).
- The OS delivers it. If the app is in the foreground, your code decides what to show. If it is in the background or killed, the OS shows the notification itself.
Two message types matter. A notification message carries a title and body and is displayed by the OS. A data-only message (a “silent” or “headless” push) wakes a background task in your app and shows nothing unless your code does. Data-only delivery is best effort: both platforms throttle it, and an Android app the user force-stopped receives nothing until it is opened again.
React Native push notification libraries compared
| Library | Version (date) | Downloads / week | Use it for |
|---|---|---|---|
| expo-notifications | 58.1.10 (Nov 26, 2026) | ~9.6M | Default client library: permissions, tokens, local and push notifications, tap handling |
| @react-native-firebase/messaging | 27.2.0 (Nov 25, 2026) | ~1.4M | Direct FCM on both platforms, topics, apps already on Firebase. New Architecture required since v26 |
| @notifee/react-native | 9.1.8 (Dec 20, 2024) | ~530K | Rich local display (styles, actions, foreground services). No npm release in almost two years, so pin it and test on each React Native upgrade |
| react-native-onesignal | 5.6.0 (Nov 21, 2026) | ~254K | Hosted segmentation and campaigns; needs React Native 0.79 or later |
| react-native-push-notification | 8.1.1 (Oct 2021) | ~54K | Legacy apps only |
Set up expo-notifications
Push does not work in Expo Go. You need a development build. On the plus side, the Android emulator (with Google Play services) and the iOS Simulator (Xcode 14 or later) can both receive push now, so a physical device is no longer required for a first test.
npx expo install expo-notifications expo-constants
Add the config plugin, then rebuild the development build:
{
"expo": {
"plugins": ["expo-notifications"]
}
}
Credentials are the part people get stuck on. Android needs a Firebase project, a google-services.json in the app, and an FCM v1 service account key uploaded to your Expo project. iOS needs an APNs key (a .p8 file from the Apple Developer account), which eas build offers to create for you.
Register and get a token
import { Platform } from 'react-native';
import * as Notifications from 'expo-notifications';
import Constants from 'expo-constants';
// Decide what happens when a notification arrives in the foreground.
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowBanner: true,
shouldShowList: true,
shouldPlaySound: true,
shouldSetBadge: false,
}),
});
export async function registerForPush(): Promise<string | undefined> {
if (Platform.OS === 'android') {
// Android 8+ shows nothing without a channel.
await Notifications.setNotificationChannelAsync('messages', {
name: 'Messages',
importance: Notifications.AndroidImportance.HIGH,
});
}
let { status } = await Notifications.getPermissionsAsync();
if (status !== 'granted') {
({ status } = await Notifications.requestPermissionsAsync());
}
if (status !== 'granted') return undefined;
const projectId =
Constants?.expoConfig?.extra?.eas?.projectId ?? Constants?.easConfig?.projectId;
const token = (await Notifications.getExpoPushTokenAsync({ projectId })).data;
// ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]
return token;
}
Call it after the user has seen why you want to notify them, not on the first frame. On iOS you get one system prompt. Waste it on a cold launch and the only way back is the Settings app. On Android 13 (API 33) and later, requestPermissionsAsync() triggers the POST_NOTIFICATIONS runtime prompt, and the prompt only appears after at least one channel exists, which is why the channel is created first.
Send the token to your backend together with the user id and platform, and send it again whenever it changes. The listener reports the native device token, so ask for the Expo token again inside it:
useEffect(() => {
const sub = Notifications.addPushTokenListener(async () => {
const token = await registerForPush();
if (token) await api.savePushToken(token);
});
return () => sub.remove();
}, []);
Handle notifications and taps
import { useEffect } from 'react';
import * as Notifications from 'expo-notifications';
import { router } from 'expo-router';
export function useNotificationRouting() {
// Fires for the tap that opened the app, too.
const lastResponse = Notifications.useLastNotificationResponse();
useEffect(() => {
const url = lastResponse?.notification.request.content.data?.url;
if (typeof url === 'string') router.push(url);
}, [lastResponse]);
useEffect(() => {
const received = Notifications.addNotificationReceivedListener((n) => {
// App is in the foreground: update a badge, refetch a list.
});
return () => received.remove();
}, []);
}
Put a route in the data payload ({ "url": "/chat/42" }) rather than a screen name and a pile of params. A URL survives refactors of your navigator, and it is the same string your deep links already use.
Send with the Expo push service
The Expo push service takes one request format and forwards it to FCM or APNs. The Node SDK (expo-server-sdk 8.0.0) batches for you and limits concurrent connections:
import { Expo } from 'expo-server-sdk';
const expo = new Expo({ accessToken: process.env.EXPO_ACCESS_TOKEN });
export async function notify(tokens: string[], title: string, body: string, url: string) {
const messages = tokens
.filter((t) => Expo.isExpoPushToken(t))
.map((to) => ({ to, title, body, sound: 'default', channelId: 'messages', data: { url } }));
const tickets = [];
for (const chunk of expo.chunkPushNotifications(messages)) {
tickets.push(...(await expo.sendPushNotificationsAsync(chunk)));
}
return tickets; // store the ticket ids
}
A ticket only means Expo accepted the message. Whether APNs or FCM accepted it comes later, as a receipt. Fetch receipts about 15 minutes after sending:
export async function checkReceipts(ticketIds: string[]) {
for (const chunk of expo.chunkPushNotificationReceiptIds(ticketIds)) {
const receipts = await expo.getPushNotificationReceiptsAsync(chunk);
for (const [id, receipt] of Object.entries(receipts)) {
if (receipt.status === 'error' && receipt.details?.error === 'DeviceNotRegistered') {
await db.deleteTokenForTicket(id); // app uninstalled or token rotated
}
}
}
}
Skip this step and your token table fills with dead devices. Every send then pays for phones that uninstalled the app a year ago, and your delivery numbers stop meaning anything.
Go direct: FCM and APNs
The Expo service covers the common payload fields. Go direct when you need topics, FCM analytics labels, APNs features the day Apple ships them, or simply no third party between your server and the platforms. On the device, swap one call:
const { data: nativeToken, type } = await Notifications.getDevicePushTokenAsync();
// type is 'android' (an FCM registration token) or 'ios' (an APNs device token)
Or use React Native Firebase, which gives you an FCM token on both platforms so the server only speaks FCM. Since v26 it requires the New Architecture, and since v22 the API is modular:
// index.js, before AppRegistry.registerComponent
import {
getMessaging,
getToken,
onMessage,
onTokenRefresh,
requestPermission,
setBackgroundMessageHandler,
} from '@react-native-firebase/messaging';
const messaging = getMessaging();
setBackgroundMessageHandler(messaging, async (message) => {
// Data-only messages land here when the app is in the background or quit.
});
export async function registerFcm() {
await requestPermission(messaging); // iOS prompt
const token = await getToken(messaging);
await api.savePushToken(token);
onTokenRefresh(messaging, (t) => api.savePushToken(t));
return onMessage(messaging, (message) => {
// Foreground: FCM shows nothing by itself. Display it yourself.
});
}
On Android 13 and later, also request PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS. On iOS, enable the Push Notifications capability and the Remote notifications background mode, and link an APNs key in the Firebase console. In an Expo project, add "aps-environment": "production" under ios.entitlements, because prebuild has not always added it since SDK 51.
The server side with firebase-admin (14.5.1):
import { getMessaging } from 'firebase-admin/messaging';
await getMessaging().send({
token,
notification: { title: 'Anna', body: 'Are we still on for 3pm?' },
data: { url: '/chat/42' },
android: { priority: 'high', notification: { channelId: 'messages' } },
apns: { payload: { aps: { sound: 'default', 'thread-id': 'chat-42' } } },
});
When send() rejects with messaging/registration-token-not-registered, delete the token. Same cleanup, different error name.
Platform details that bite
- Android channels are permanent. Once a channel exists, the user owns its importance and sound. Changing them in code does nothing. Plan the channel ids (messages, mentions, marketing) before the first release.
- Foreground means silent by default. With expo-notifications, no handler means no banner. With FCM,
onMessagefires and nothing is displayed. - Notification icons on Android must be white on transparent. A coloured PNG renders as a grey square.
- iOS badge counts are yours to manage. The server sends the number; the app clears it. Nobody else will.
- Simulator success proves little. Test release builds on real devices on mobile data, with the app killed, before you tell anyone push works.
Push notifications for chat apps
Chat is the hardest customer for push, because the notification competes with a live socket. Three rules have held up for us. First, do not notify a device that is connected and looking at the conversation: have the server check presence before sending, or drop the banner in the foreground handler when the open screen matches data.url. Second, group by conversation (thread-id on iOS, a per-room tag on Android), or twenty messages become twenty banners. Third, decide what goes in the payload. In regulated apps the body should be “New message”, with the content fetched after the app opens, because lock screens are not private.
Disclosure: we build Ethora, an open-source chat and AI agent SDK with a React Native package, and push for offline room members is part of what its backend does, so much of this section is scar tissue. If you are building chat yourself, read our chat app tutorial and the WebSockets guide for the connected half of the problem, and the chat SDK comparison if you would rather not build it at all.
Debugging checklist
| Symptom | Usual cause |
|---|---|
| No token on iOS | Missing Push Notifications capability or aps-environment entitlement; running in Expo Go |
| Token arrives, nothing is delivered on Android | No FCM v1 credentials uploaded, wrong google-services.json, or no notification channel |
| Works in debug, fails in release on iOS | Sandbox and production APNs environments mixed up; an APNs key covers both, a certificate does not |
| Arrives in background, not in foreground | No notification handler set, or the handler returns shouldShowBanner: false |
| Tap opens the app on the home screen | No response listener, or the listener is registered after the navigator mounted and the first response was missed. Use useLastNotificationResponse() |
| Delivery stops after a few days for some users | Battery optimisation on some Android vendors, or the user force-stopped the app |
For the security side of tokens and payloads, see the React Native security checklist. An older, shorter walkthrough of the same topic lives in How to implement push notifications in a React Native app, and if Expo itself is new to you, start with What is Expo?
FAQ
What is the best library for push notifications in React Native?
For most apps, expo-notifications. It works in Expo and bare projects, covers local and push notifications on both platforms, and can produce either an Expo push token or the native FCM and APNs tokens.
Do React Native push notifications work in Expo Go?
No. Push notifications need a development build or a production build. Local notifications still work in Expo Go.
Is the Expo push service free?
Expo has not charged for sending push notifications through its service, though it applies rate limits, so check the current terms for your plan. You still need your own FCM and APNs credentials, which are free from Google and included in the Apple Developer Program.
Can I send push notifications without Firebase?
On iOS, yes: APNs does not involve Firebase. On Android, FCM is the delivery channel for devices with Google Play services, so you need a Firebase project even if you never use another Firebase product.
Why do notifications not arrive when the app is killed?
Notification messages are shown by the OS and arrive when the app is killed. Data-only messages depend on a background task and are throttled, and on Android nothing is delivered to an app the user force-stopped until it is opened again.