expo run, EAS development builds, and production builds.
Expo Go is not supported because mobile push requires native code.
If your React Native app already owns native android and ios projects without Expo prebuild, use React Native Bare SDK.
Requirements
- Expo project using development builds or prebuild.
- Android device or emulator with Google Play services.
- Physical iOS device for APNs testing.
- A Sendrealm app ID from the dashboard.
- Firebase credentials uploaded for Android delivery.
- APNs credentials uploaded for iOS delivery.
- Push Notifications enabled for the iOS Bundle ID in Apple Developer.
Setup Order
- Upload Firebase and APNs credentials in Sendrealm.
- Install
@sendrealm/react-native. - Add the Sendrealm Expo plugin to
app.jsonorapp.config.js. - Add Android
google-services.json. - Configure iOS push capabilities.
- Run Expo prebuild or create an EAS build.
- Initialize Sendrealm from JavaScript.
- Ask for notification permission after explaining the value to the user.
- Call
loginwhen the user signs in. - Send test pushes on Android and iOS.
Install
Configure The Plugin
Add the Sendrealm plugin toapp.json or app.config.js:
.p8 files in Expo config. Provider private keys belong in the Sendrealm dashboard.
Android Setup
Generategoogle-services.json from Firebase and save it in your Expo project. Point the plugin at the file:
expo.android.package.
iOS Setup
In Apple Developer:- Open Certificates, Identifiers & Profiles.
- Open Identifiers.
- Select the App ID for the Bundle ID in your Expo config.
- Enable Push Notifications.
- Save the App ID changes.
- Set
ios.apnsEnvironmenttosandboxfor development builds orproductionfor TestFlight and App Store builds. - Set
ios.enableBackgroundRemoteNotificationstotrueonly if you send silent/background pushes. - Set
ios.notificationServiceExtensiontotrueif you send rich image notifications.
Prebuild And Run
Generate native projects and run locally:--device for iOS push testing.
Build With EAS
Build development clients with EAS:Initialize
Read values from Expo config and initialize once:production for production-targeted app builds.
Most apps should keep autoRequestPermission: false and ask permission after an in-app explanation.
Ask For Permission
Link A Signed-In User
Tags And Events
Use tags for app-observed preferences, state, and behavior:login before setting user tags.
Rich iOS Media
Rich image notifications require a Notification Service Extension. Enable it in the plugin:Android Notification Icons
Android status bar icons should be simple drawable resources, usually monochrome. If you set:res/drawable/ic_stat_sendrealm.xml.
Diagnostics
Use support diagnostics while testing:- A device ID.
- Token presence.
- Expected permission status.
- Subscribed state unless the user opted out.
- SDK version.
- No unexpected SDK error.
Troubleshooting
| Symptom | What to check |
|---|---|
| Expo Go does not work | Build a development client or production app because native code is required. |
| Android token is missing | Use a Google Play device or emulator and verify the Firebase Android package name. |
| iOS push does not arrive | Use a physical device and verify APNs environment, Bundle ID, Team ID, Key ID, and .p8 key in Sendrealm. |
| iOS entitlement is missing | Enable Push Notifications on the Apple Developer App ID, rerun prebuild, and rebuild the app. |
| Plugin changes do not appear | Rerun expo prebuild or create a fresh EAS build. |
| Notifications are delayed | Check Android power management, FCM priority, iOS APNs priority, Focus settings, and notification permissions. |
| Some pushes are missing | Check stale tokens, disabled channels, offline devices, and provider diagnostics. |
| Rich images do not attach | Confirm notificationServiceExtension is enabled and the app has been rebuilt. |
Tags return ContactNotLinked | Call login(userId, email) before tags. |