# How to add push notifications to a mobile app

> Permission, device token, storage, send — the four steps behind a working push, plus the two places push will never fire no matter what you build.

Canonical: https://vibely.sh/guides/how-to-add-push-notifications-to-a-mobile-app
Last updated: 2026-09-19

Published 2026-09-19 · Mobile apps · 5 min read

## Reference documentation

- [Native device APIs](https://docs.vibely.sh/features/mobile-apps/native)
- [Ship to stores](https://docs.vibely.sh/features/mobile-apps/ship)

Push is a native capability, which is why a web app cannot have it and a Vibely mobile project can. The module is `expo-notifications`, and the wiring is four steps — ask for it in chat and the agent writes all four.

## The four steps

1. **Request permission at a moment that makes sense.** Not on first launch — on the first interaction with the feature ("Enable reminders"). A permission prompt fired at a cold start is the most common reason an app never gets to send anything.
2. **Get the device token** with `getExpoPushTokenAsync`.
3. **Store the token against the user row** in your [Supabase](https://vibely.sh/features/database) project. One user can have several devices, so this is a row per device, not a column on the profile.
4. **Send server-side** through the [Expo push API](https://docs.expo.dev/push-notifications/sending-notifications/). The easiest place to call it from is a [Supabase Edge Function](https://vibely.sh/glossary/supabase-edge-function) — the same backend your app already has.

A useful prompt: *"Add push notifications. Ask for permission when the user turns on reminders, store the Expo token per device in Supabase, and write an Edge Function that sends a push to one user."*

## If you only need reminders, you do not need a server

"Remind me at 8 AM" is a **local** notification, scheduled on the device with `Notifications.scheduleNotificationAsync`. No token, no backend, no Edge Function. A large share of habit trackers, medication reminders and timer apps need nothing else — start here and add remote push only when something outside the phone has to trigger it.

## Where push will not fire

- **The web preview.** Push is native. The preview is a browser; it will never ring.
- **The iOS Simulator**, without a paid Apple Developer account.

Test on a real device: scan the [Expo Go](https://vibely.sh/glossary/expo-go) QR code from the project, or install a custom [EAS build](https://vibely.sh/glossary/eas-build). This is the point where building a mobile app stops resembling building a website — the thing has to run on a handset to be tested at all, and every guide that says otherwise has never shipped one.

## Before you submit

Apple reviews what your permission prompt says. The agent writes the `NSUserNotificationsUsageDescription`-class strings as it adds the capability, so the reason shown to the user matches what the app does — one of the [five rejections that actually happen](https://vibely.sh/guides/how-to-publish-your-app-to-the-app-store).

## Related

- [How to publish your app to the App Store](https://vibely.sh/guides/how-to-publish-your-app-to-the-app-store) - previous guide
- [How to add Google sign-in to your app](https://vibely.sh/guides/how-to-add-google-sign-in-to-your-app) - next guide
- [Mobile apps guides](https://vibely.sh/guides/category/mobile)
