This guide walks you through configuring push notifications for the Crisp SDK on iOS and Android.
Before starting, ensure you have:
- Enabled the config plugin in your
app.json(see README) - A Crisp account with access to your Website settings
- For iOS: An Apple Developer account
- For Android: A Firebase project
-
Go to your Apple Developer Account - Keys
-
Click the + button to create a new key
-
Enter a Key Name (e.g., "Crisp Push Notifications")
-
Check the Apple Push Notifications service (APNs) checkbox
-
Click Configure to set up the environment
When configuring the key, you must select which APNs environment(s) your key will support:
| Environment | Description | Use Case |
|---|---|---|
| Sandbox | Development/testing environment | Local development builds, debug builds from Xcode |
| Production | Live environment | App Store releases, TestFlight builds |
| Sandbox & Production | Both environments | Recommended for flexibility during development and production |
Apple maintains two completely separate push notification environments:
-
Sandbox: Used when your app is built with a development provisioning profile (running from Xcode, debug builds). Device tokens generated in sandbox are only valid for sandbox.
-
Production: Used when your app is distributed via TestFlight or the App Store. Device tokens generated in production are only valid for production.
Important
Device tokens are environment-specific. A token from a development build will NOT work for production notifications, and vice versa.
Recommendation: Select "Sandbox & Production" to have maximum flexibility. This allows the same key to work for both development testing and production releases.
-
After configuring the environment, click Continue
-
Review your configuration and click Register
-
Download your
.p8certificate file immediately
Warning
The .p8 file can only be downloaded once. Store it securely as you cannot re-download it later.
-
Go to Crisp Dashboard
-
Navigate to Settings > Chatbox Settings > Push Notifications
-
In the iOS section, provide the following information:
Field Description Where to find it Certificate Your .p8APNs key fileDownloaded in Step 3 Team ID Your Apple Developer Team identifier (10 characters) Apple Developer Account > Membership details, or visible in Xcode under Signing & Capabilities Bundle ID Your app's bundle identifier Defined in your app.json(expo.ios.bundleIdentifier) or Xcode project settingsKey ID The APNs key identifier (10 characters) Shown after creating the key, or in your Keys list -
If you want to test with development builds, enable the Sandbox mode toggle in Crisp Dashboard
-
Click Verify to validate your credentials
After running npx expo prebuild, open your project in Xcode and verify:
-
Open Signing & Capabilities tab
-
Ensure the correct Team is selected (must match the Team ID you provided to Crisp)
-
Verify the Bundle Identifier matches what you configured in Crisp
-
Confirm these capabilities are present:
- Push Notifications capability
- Background Modes with Remote notifications checked
Note
The crisp-sdk-react-native config plugin automatically adds these capabilities when notifications.enabled is true.
Warning
Push notifications do NOT work on iOS Simulator. You must test on a real device.
Your build type must match your APNs key environment and Crisp Sandbox setting:
| Build Type | APNs Key Environment | Crisp Sandbox Mode |
|---|---|---|
| Development build (Xcode/Expo prebuild) | Must include Sandbox | Enabled |
| TestFlight | Must include Production | Disabled |
| App Store | Must include Production | Disabled |
- APNs key environment matches your build type
- Crisp Sandbox mode matches your build type (enabled for dev, disabled for production)
- Team ID in Crisp matches your Apple Developer account
- Bundle ID in Crisp exactly matches your app's bundle identifier
- Key ID in Crisp matches your APNs key
- Testing on a real iOS device (not simulator)
Once Crisp confirms successful configuration, you're ready to receive push notifications!
Android push notifications use Firebase Cloud Messaging (FCM). The setup consists of three parts:
- Firebase Console: Create a project and get your credentials
- Crisp Dashboard: Configure your Firebase credentials
- Your Project: Add the configuration file and enable notifications
Let's start with Firebase.
-
Go to the Firebase Console
-
Click Create a project (or Add project if you already have projects)
-
Enter your Project name (e.g., "My App Crisp")
-
Choose whether to enable Google Analytics (optional)
-
Click Create project and wait for the setup to complete
-
From your Firebase project dashboard, click the Android icon to add an Android app
-
Enter your Android package name
Important
This must exactly match your expo.android.package value in app.json
-
(Optional) Enter an app nickname for identification in the Firebase Console
-
(Optional) Enter your SHA-1 signing certificate (not required for push notifications)
-
Click Register app
-
After registering, click Download google-services.json
-
Place this file at the root of your Expo project (same level as
app.json) -
Update your
app.jsonto reference the file:{ "expo": { "android": { "googleServicesFile": "./google-services.json", "package": "com.yourcompany.yourapp" } } } -
Skip the "Add Firebase SDK" step in Firebase Console - the crisp-sdk-react-native plugin handles this automatically
-
Click Continue to console
Warning
Keep your google-services.json file secure. While it contains public identifiers, it's best practice not to expose it unnecessarily.
Now that your app is registered, you need to get two pieces of information from Firebase to configure Crisp:
-
In Firebase Console, click the gear icon next to "Project Overview"
-
Select Project settings
-
In the Cloud Messaging tab, find the Sender ID
Note
The "Sender ID" IS your Project Number. Firebase uses these terms interchangeably.
- Copy this number (e.g.,
123456789012)
-
Still in Project settings, go to the Service accounts tab
-
Click Generate new private key
-
Confirm by clicking Generate key
-
A JSON file will be downloaded automatically
Warning
Store this private key securely. It grants access to your Firebase project and should never be committed to version control or shared publicly.
With your Firebase credentials ready, let's configure Crisp to send push notifications.
-
Go to Crisp Dashboard
-
Navigate to Settings > Chatbox > Push Notifications
-
In the Android section, provide the following information:
Field Description Where to find it Certificate Your Firebase private key JSON file Downloaded in Step 4.2 Project Number Your Firebase Sender ID (Project Number) Firebase Console > Project settings > Cloud Messaging tab -
Click Verify to validate your credentials
-
If verification succeeds, the status will show as live
The final step is to add the Firebase configuration to your project. Choose the instructions based on your project type:
-
Place the
google-services.jsonfile at the root of your Expo project (same level asapp.json) -
Update your
app.jsonto reference the file and enable notifications:{ "expo": { "plugins": [ [ "crisp-sdk-react-native", { "websiteId": "YOUR_WEBSITE_ID", "notifications": { "enabled": true, "mode": "sdk-managed" } } ] ], "android": { "googleServicesFile": "./google-services.json", "package": "com.yourcompany.yourapp" } } } -
Rebuild your project:
npx expo prebuild --clean
Note
The crisp-sdk-react-native config plugin automatically adds Firebase Messaging dependencies and configures the native Android project when notifications.enabled is true.
- Place the
google-services.jsonfile in theandroid/app/directory of your project (at the app module level)
-
Follow the Firebase Android Setup Guide to configure your project
-
Add the Firebase Messaging dependency to your app-level
build.gradlefile (android/app/build.gradle):dependencies { // ... other dependencies implementation 'com.google.firebase:firebase-messaging' }
-
Rebuild your project:
cd android && ./gradlew clean && cd .. npx react-native run-android
-
google-services.jsonis at the root of your Expo project -
googleServicesFilepath is correctly set inapp.json - Package name in Firebase matches
expo.android.packageinapp.json -
notifications.enabledistruein the plugin configuration - Private key JSON uploaded to Crisp Dashboard
- Sender ID entered in Crisp Dashboard
- Crisp verification shows live status
- App has been rebuilt with
npx expo prebuild --clean
-
google-services.jsonis in theandroid/app/directory - Package name in Firebase matches
applicationIdinandroid/app/build.gradle - Firebase Messaging dependency added to
build.gradle - Private key JSON uploaded to Crisp Dashboard
- Sender ID entered in Crisp Dashboard
- Crisp verification shows live status
- App has been rebuilt
Once Crisp confirms successful configuration, you're ready to receive push notifications on Android!
