Introduction
Google Firebase Cloud Messaging powers push notifications on Android and iOS. By integrating Firebase V1 with your BuddyBoss App, you’ll enable real-time notifications for your members’ devices. This guide walks you through creating a Firebase project, enabling the Cloud Messaging API, generating service keys, registering your iOS and Android apps, and uploading configuration files in WordPress.
Tutorial Video
Creating a Firebase Project
- Log in to the Google Firebase Console.
- Click Add Project.
- Enter a Project Name and click Continue.
- (Optional) Enable Google Analytics, click Continue, choose or accept the Default Account, then click Create Project.
If you enabled Google Analytics, select your Google Analytics account or select Default Account for Firebase. Click Create Project.
- Wait for the setup to complete; then click Continue to open your new project.
Enabling Firebase Cloud Messaging API (V1)
- In your Firebase project, click the Settings gear and select Project settings.
- Go to the Cloud Messaging tab.
- Confirm the Firebase Cloud Messaging API shows a green Enabled tick.
- If it isn’t enabled:
- Click the ⋮ menu next to Firebase Cloud Messaging API and choose Manage API in Google Cloud Console.
- You will then be redirected to the Google Cloud Messaging API product. Select ‘Manage’.
- On the Google Cloud page, click Enable at the top to turn on the API.
- You will then see the option to either enable or disable the API at the top and you will also see the status of your API, make sure it says ‘Enabled’.
Generating a Firebase Service Account Key
- In Project settings, open the Service accounts tab.
- Scroll to Firebase Admin SDK and click Generate new private key.
- In the popup, click Generate Key.
- Save the downloaded .json file securely—it can only be downloaded once.
Creating Firebase Apps
- On the Project Overview page, click the iOS button to register your iOS app:
- Enter your Bundle ID (from BuddyBoss App > Configure > iOS Settings).
- Click Register App, then download GoogleService-Info.plist.
- Enter your Bundle ID (from BuddyBoss App > Configure > iOS Settings).
- Click the Android button to register your Android app:
- Enter your Application ID (from BuddyBoss App > Configure > Android Settings).
- Click Register App, then download google-services.json.
- Enter your Application ID (from BuddyBoss App > Configure > Android Settings).
- Click Next through steps 2–4, then Done on step 5 for each platform.
Connecting Firebase to Your BuddyBoss App
- In WordPress, go to BuddyBoss App > Configure > Google Firebase.
- Under Firebase Cloud Messaging API V1, click Upload and select the service account .json file.
- Upload the GoogleService-Info.plist (iOS release), google-services.json (Android release), and if needed, test-app config files.
- Click Save Settings to complete the integration.
Troubleshooting and FAQs
Q: Why don’t my push notifications arrive after setup?
A:
- Verify you uploaded the correct service account JSON and platform config files.
- Ensure your Android build uses the new V1 API (clear caches and rebuild).
Q: I get a “Missing API key” error in Firebase tab.
A:
- Confirm you enabled the Firebase Cloud Messaging API (V1) in Google Cloud Console.
- Refresh the Firebase page and re-upload the JSON key.
Q: How can I regenerate my service key?
A:
- In Service accounts, delete the old key, then click Generate new private key.
- Upload the new key in BuddyBoss App > Configure > Google Firebase.
Q: Do I need to re-upload config files for test builds?
A:
- Yes. If you generate separate test-app builds, upload their specific config files alongside the release files before saving.