Native FCM + APNs push delivery viaDocumentation Index
Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
Use this file to discover all available pages before exploring further.
expo-notifications.
For platform-specific setup (APNs credentials and entitlement on iOS, google-services.json and FCM credentials on Android), see Native Push Setup.
SuprSendPushProvider waits for the user to be identified, then requests permission, obtains the native FCM/APNs token, and registers it with SuprSend.
Handling taps and foreground notifications
useSuprSendPushNotifications returns onPushNotificationReceived / onPushNotificationTapped subscribers. Each takes a handler and returns an unsubscribe function — drop them straight into useEffect.
Unregister push
CallunregisterPushNotification() to remove the push token from the user in SuprSend. Usually called just before logout.
Manual registration
Disable auto-registration and callregisterPushNotification() yourself — e.g. after an onboarding screen:
Push API reference
Customisations
Custom notification icon and accent color
Android does not use your launcher icon for notifications — without an explicit icon you get a generic bell. Set a custom small icon and accent color via theexpo-notifications config plugin in app.json:
icon— path to the small icon shown in the status bar and notification tray. Place the file in your project’sassets/folder and reference it by that path.color— accent color applied to the icon and used as the notification’s default tint.
.png extension (e.g. notification-icon.png).
iOS uses the app icon for notifications automatically — these settings only apply to Android. After changing the plugin config, rebuild with
npx expo run:android (Expo Go cannot apply config plugins).Adding or removing notification channels
By default the SDK creates a single Android channel nameddefault with MAX importance, a vibration pattern, and a light color. Override it by passing setupAndroidNotificationChannel to SuprSendPushProvider — your function is called once before push permission is requested.
deleteNotificationChannelAsync:
Deep links from notifications
When the user taps a SuprSend push, you usually want to land them on a specific screen — an order, a chat, a settings page. This needs three things wired up:- A URL set on the SuprSend template (per platform — see below for the payload key).
- The OS configured to route that URL into your app (a custom scheme, an iOS associated domain, and an Android intent filter).
- JS code that reads the URL from the tap response and navigates.
1. Set the deep link on the SuprSend template
In the SuprSend Dashboard, open the template you’re sending and set the deep-link URL on both the iOS and Android variants — the field differs per platform:- iOS — set the Action URL field. SuprSend forwards it as
global_action_urlat the top level of the APNs payload. - Android — open Advanced Configuration on the Android push template and add a Custom Key-Value entry with key
urland the deep link as the value. SuprSend forwards it as a data field on the FCM message.
- Custom scheme — e.g.
suprsendexpoexample://home. Simplest to set up, opens only your app. - Universal / App Links — e.g.
https://yourdomain.com/home. Opens your app if installed, otherwise falls back to the web URL.
2. Configure native deep link entry points in app.json
scheme— registerssuprsendexpoexample://…as an app-only URL on both platforms. Use only if your custom URLs are simple.ios.associatedDomains— enables iOS Universal Links forhttps://yourdomain.com/…. Two prerequisites in addition to this entry:- In the Apple Developer portal, open your App ID under Certificates, IDs & Profiles → Identifiers and tick the Associated Domains capability, then save.
- Serve an
apple-app-site-association(AASA) file athttps://yourdomain.com/.well-known/apple-app-site-association.
android.intentFilters— handleshttps://yourdomain.com/…taps. WithautoVerify: trueyou must also publish anassetlinks.jsonathttps://yourdomain.com/.well-known/assetlinks.json.
AASA / assetlinks files are only required for universal/App Links. Custom schemes (
suprsendexpoexample://…) work without them.npx expo run:ios / npx expo run:android. Config plugins don’t run inside Expo Go.
3. Read the URL from the tap and navigate
Subscribe to push taps withuseSuprSendPushNotifications().onPushNotificationTapped. The deep-link URL sits at different paths in the tap response across platforms — iOS gets the raw APNs payload under trigger.payload, Android gets the FCM data fields under content.data: