- Android uses Firebase Cloud Messaging, often called FCM.
- iOS uses Apple Push Notification service, usually called APNs.
com.example.app and com.example.app.dev, configure the provider for the exact identity that will initialize the SDK and receive notifications.
What Goes Where
It is easy to confuse the different Firebase and Apple files. Use this table as the quick map:Android apps need
google-services.json in the app and a Firebase service account private key JSON in Sendrealm. The two files are not interchangeable.Before You Start
You need:- A Sendrealm project and app in the dashboard.
- Firebase project owner or admin access for Android setup.
- Apple Developer Account Holder or Admin access for iOS setup.
- Android application ID, for example
com.example.app. - iOS bundle ID, for example
com.example.app. - A real Android device or Google Play emulator for Android testing.
- A physical iOS device for APNs testing.
Android: Create The Firebase Key
Use this section for Android push delivery through Firebase Cloud Messaging.Step 1: Open The Firebase Project
- Open the Firebase console.
- Select the Firebase project for your Android app.
Step 2: If You Start From Google Cloud, Add Firebase First
If your project already exists in Google Cloud but not Firebase, open the Firebase console and choose Add Firebase to Google Cloud project. Select the existing Google Cloud project and complete the Firebase setup. After Firebase is added, continue with the Android app registration steps below.google-services.json is generated from the Firebase Android app registration flow, not directly from the regular Google Cloud console.
Step 3: Register The Android App
If the Android app is not registered in Firebase yet:- From the Firebase project overview, add an Android app.
- Enter the exact Android package name used by your app.
- Complete the app registration flow.
applicationId, for example com.example.app. It is case-sensitive and must match the app that users install.
Step 4: Download google-services.json
Firebase offers google-services.json during Android app setup. Download it and keep it in your app project.
Where the file goes depends on your app type:
Make sure the file name is exactly
google-services.json. If your browser downloads google-services (1).json, rename it before using it.
This file is not enough for Sendrealm server-side push. Continue to the next step to create the private key Sendrealm needs.
Step 5: Generate The Service Account Private Key
- In Firebase, open Project settings.
- Open the Service accounts tab.
- Click Generate new private key.
- Confirm the download.
- Save the downloaded JSON file securely.
Step 6: Upload The Firebase Key To Sendrealm
In Sendrealm:- Open your project.
- Open Push Notifications from the project navigation, next to Domains.
- Choose Android or Firebase provider settings.
- Upload the Firebase service account JSON file.
- Enter the Android package name that matches the app Gradle
applicationId. - Save the provider.
Android Values To Check
Before testing Android push, confirm:- Firebase project matches the app you ship.
- Android package name in Firebase exactly matches your app
applicationId. - Android package name in Sendrealm exactly matches your app
applicationId. - Package name casing is identical.
- Firebase service account belongs to the same Firebase project.
- The uploaded file is a full JSON private key file.
google-services.jsonis present in the Android app.- The Google Services Gradle plugin is applied for native Android and React Native Bare apps.
- The Android device or emulator has Google Play services.
- The app has initialized the Sendrealm Android or React Native SDK.
- Android 13 and newer devices have notification permission granted.
Android Common Mistakes
iOS: Create The APNs Key
Use this section for iOS push delivery through Apple Push Notification service.Step 1: Confirm The App ID And Bundle ID
- Open Certificates, Identifiers & Profiles.
- Open Identifiers.
- Select the App ID for your app.
- Confirm the Bundle ID matches your Xcode target.
Step 2: Enable Push Notifications On The App ID
Apple must allow the Bundle ID to use APNs.- In Certificates, Identifiers & Profiles, open Identifiers.
- Select the App ID for your Bundle ID.
- Click Edit.
- Enable Push Notifications.
- Save and confirm the change.
Step 3: Enable Capabilities In The App
The Apple Developer App ID is the server-side permission. The app target also needs the matching entitlement at build time. For native iOS and React Native Bare:- Open the app project or workspace in Xcode.
- Select the main iOS app target.
- Open Signing & Capabilities.
- Add Push Notifications.
- Confirm the Team and Bundle Identifier match the App ID from Step 1.
- Confirm
expo.ios.bundleIdentifiermatches the App ID. - Configure the Sendrealm Expo plugin.
- Run
npx expo prebuild --platform iosor create a new EAS build. - If the generated native project is committed, open
ios/*.xcworkspaceand verify the main app target has Push Notifications under Signing & Capabilities.
- Native iOS and React Native Bare: add Background Modes in Xcode and check Remote notifications.
- React Native Expo: set
ios.enableBackgroundRemoteNotificationstotruein the Sendrealm Expo plugin, then rebuild.
- Native iOS and React Native Bare: add or configure a Notification Service Extension target.
- React Native Expo: set
ios.notificationServiceExtensiontotrue, run prebuild, and rebuild.
Step 4: Create The APNs Private Key
- In Certificates, Identifiers & Profiles, open Keys.
- Click the add button.
- Enter a clear key name, for example
Sendrealm Push. - Select Apple Push Notification service.
- Click Configure next to Apple Push Notification service.
- Choose the environment configuration and key type.
- Review the configuration.
- Click Confirm.
- Download the private key immediately.
.p8 file. You can only download that same private key once. If you lose it, create a new APNs key and update Sendrealm.
The APNs key must have Apple Push Notification service selected. A key created only for another Apple service cannot send notifications through APNs. Apple requires the Account Holder or Admin role to create keys.
Step 5: Choose Team Scoped Or Topic Specific
Apple may let you choose between Team Scoped and Topic Specific APNs keys.- Team Scoped is simpler for most teams and can be used across apps owned by the same Apple team.
- Topic Specific restricts the key to selected bundle IDs.
Step 6: Find The APNs Key ID
- Open Certificates, Identifiers & Profiles.
- Open Keys.
- Select the APNs key.
- Copy the key identifier shown below the key name.
Step 7: Find The Apple Team ID
Open your Apple Developer account membership details and copy the Team ID for the team that owns the app Bundle ID. The Team ID must belong to the same Apple developer team that owns:- The App ID
- The Bundle ID
- The APNs key
Step 8: Upload APNs Values To Sendrealm
In Sendrealm:- Open your project.
- Open Push Notifications from the project navigation, next to Domains.
- Choose iOS or APNs provider settings.
- Upload the
.p8file. - Enter the Key ID.
- Enter the Team ID.
- Enter the Bundle ID.
- Select the APNs environment.
- Save the provider.
APNs Sandbox vs Production
APNs has separate sandbox and production environments. The environment must match the build that created the APNs token.
If the environment is wrong, the app can successfully register a token, but APNs may reject sends for that token.
iOS Values To Check
Before testing iOS push, confirm:- Bundle ID in Sendrealm matches the Xcode app target.
- Bundle ID in Sendrealm matches
expo.ios.bundleIdentifierfor Expo apps. - App ID has Push Notifications enabled in Apple Developer.
- Xcode app target has Push Notifications enabled under Signing & Capabilities.
- Background Modes includes Remote notifications if you send silent/background pushes.
- A Notification Service Extension is present if you send rich image notifications.
- Team ID belongs to the team that owns the Bundle ID.
- Key ID belongs to the uploaded
.p8key. - APNs key has Apple Push Notification service enabled.
- Topic Specific APNs key includes this Bundle ID, if you used Topic Specific.
- APNs environment matches the build type.
- The app is running on a physical device.
- The iOS app is installed on a physical device and has completed SDK initialization.
- The user has granted notification permission.
iOS Common Mistakes
Upload In Sendrealm
The exact dashboard labels may vary, but the provider setup follows this shape:- Open your Sendrealm project.
- Open Push Notifications from the project navigation, next to Domains.
- Add or edit the Android provider.
- Upload the Firebase service account JSON and enter the Android package name.
- Add or edit the iOS provider.
- Upload the APNs
.p8file and enter Key ID, Team ID, iOS Bundle ID, and environment. - Save the provider settings.
- Send a test notification to a development device.
Test The Full Flow
Credentials are only one half of push setup. The app must also register a token. For Android:- Install the app on a Google Play device or emulator.
- Initialize the Android or React Native SDK.
- Request notification permission on Android 13 or newer.
- Confirm diagnostics show token presence.
- Send a test push from Sendrealm.
- Install the app on a physical device.
- Initialize the iOS or React Native SDK.
- Request notification permission.
- Confirm diagnostics show token presence.
- Send a test push from Sendrealm.
Delivery Timing Is Best Effort
Credentials let Sendrealm authenticate with Firebase and APNs. They do not guarantee that every notification appears instantly on every device. After Sendrealm sends a push, final delivery is still affected by:- Device network connectivity.
- Android Doze and App Standby.
- Android battery optimization and manufacturer-specific background restrictions.
- Android notification channel settings.
- FCM priority and throttling behavior.
- iOS APNs priority.
- iOS Focus, notification summary, and notification settings.
- iOS background update throttling.
- Stale or inactive device tokens.
Rotate Credentials
Rotate provider credentials when a key is exposed, when team access changes, or as part of your security policy. For Firebase:- Generate a new service account private key.
- Upload the new JSON file to Sendrealm.
- Send a test push.
- Delete the old service account key in Google Cloud or Firebase once the new key works.
- Create and download a new APNs key.
- Upload the new
.p8, Key ID, Team ID, Bundle ID, and environment to Sendrealm. - Send a test push.
- Revoke the old APNs key after traffic has moved to the new key.
Security Notes
- Never commit Firebase service account private keys.
- Never commit APNs
.p8files. - Do not send provider private keys through chat, email, or tickets unless your company has an approved secure process.
- Limit dashboard access to people who need to manage push providers.
- Rotate credentials after employee offboarding if your policy requires it.
- Keep a record of which Firebase project and Apple team belong to each Sendrealm app.
Official References
- Firebase Admin SDK service account setup
- Firebase Android app setup
- FCM HTTP v1 authorization
- Apple APNs authentication tokens
- Create an Apple private key
- Get an Apple key identifier