BubblDocs

Firebase Configuration

๐Ÿ“˜ Context Integrate Firebase with your Bubbl platform to enable push notifications, analytics, and geofencing.

Follow these steps to wire up Firebase for your Bubbl backend, Android & iOS clients, and ensure all required capabilities are enabled.

Step 1: Navigate to the Firebase Console

Firebase console landing page

Step 2: Select Your Project & Service Accounts

Firebase project settings > Service accounts
  • Choose your project from the selector.
  • Click the โš™๏ธ Settings gear โ†’ Project settings.
  • Switch to the Service accounts tab.

Step 3: Generate a New Private Key

Generate new private key button
  • Click Generate new private key.
  • Confirm by clicking Generate key.
  • A JSON file will downloadโ€”this is your service account. Keep it secret!

Step 4: Upload Service Account Credentials

Upload service account credentials form
  • In your Bubbl Platform UI โ†’ Plugins > Firebase Configuration.
  • Upload the downloaded JSON under โ€œUpload Firebase Credentials.โ€
  • Your backend is now authorized to send push notifications.

Step 5: Enable Cloud Messaging

To deliver pushes you must turn on Firebase Cloud Messaging.

Enable Cloud Messaging API
1. In the Firebase console, go to APIs & Services > Dashboard in the linked GCP project.
2. Click Enable APIs and Services, search for โ€œFirebase Cloud Messaging APIโ€ and enable it.

Once these are set, Firebase can route notifications to both Android and iOS (FCM) endpoints.

Global Permissions & Capabilities

๐Ÿ”’ Android Manifest
Ensure the following are in
app/src/main/AndroidManifest.xml
:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<application>
  <service
    android:name=".MyFirebaseMessagingService"
    android:exported="false">
    <intent-filter>
      <action android:name="com.google.firebase.MESSAGING_EVENT"/>
    </intent-filter>
  </service>
</application>

Mobile App Setup

Register your Android & iOS apps so they can receive notifications & analytics.

1. Android

Firebase add Android app dialog
  • Package name (applicationId), e.g.
    com.example.myapp
    .
  • App nickname (optional).
  • Click Register app.

Download
google-services.json

Download google-services.json button
  • Download and place it in
    app/
    .

Add Firebase SDK

// project-level build.gradle
buildscript {
  repositories { google(); mavenCentral() }
  dependencies {
    classpath 'com.google.gms:google-services:4.4.2'
  }
}
allprojects {
  repositories { google(); mavenCentral() }
}

// app-level build.gradle
plugins {
  id 'com.android.application'
  id 'com.google.gms.google-services'
}
dependencies {
//   FIREBASE DEPENDENCIES

}

2. iOS

Firebase add iOS app dialog
  • Bundle ID (e.g.
    com.example.myapp
    ).
  • Nickname (optional).
  • App Store ID (optional).
  • Click Register app.

Download
GoogleService-Info.plist

Download GoogleService-Info.plist button
  • Drag it into your Xcode project (copy items if needed).

Upload APN Certificate for iOS Push Notifications

๐ŸŽ APN Certificate Required: For iOS push notifications to work via Firebase Cloud Messaging, you must upload your Apple Push Notification certificate to Firebase.

Step 1: Generate APN Certificate

  1. Go to Apple Developer Portal โ†’ Certificates
  2. Click the "+" button to create a new certificate
  3. Select "Apple Push Notification service SSL (Sandbox & Production)"
  4. Choose your App ID and follow the CSR upload process
  5. Download the generated certificate (.cer file)

Step 2: Convert Certificate to .p12 Format

  1. Double-click the .cer file to add it to your Keychain
  2. Open Keychain Access โ†’ My Certificates
  3. Find your certificate, expand it to see the private key
  4. Select both the certificate and private key (Cmd+Click)
  5. Right-click โ†’ Export 2 items โ†’ Save as .p12 file
  6. Set a password (you'll need this for Firebase)

Step 3: Upload to Firebase

  1. In Firebase Console โ†’ Project Settings โ†’ Cloud Messaging tab
  2. Scroll to "Apple app configuration"
  3. Click "Upload" next to APNs Certificates
  4. Upload your .p12 file and enter the password
  5. Save the configuration
๐Ÿ’ก Alternative: APNs Auth Key
Instead of certificates, you can use APNs Authentication Keys (recommended for multiple apps):
  1. Apple Developer โ†’ Keys โ†’ Create new APNs Auth Key
  2. Download the .p8 file
  3. In Firebase โ†’ Upload APNs Auth Key with Team ID and Key ID

Enable iOS Capabilities in Xcode

In your iOS app target โ†’ Signing & Capabilities, add:

  • Push Notifications - Required for receiving notifications
  • Background Modes โ†’ Location updates - Required for geofencing
Xcode Background Modes panelXcode Push Notifications capability

Configuration Summary

โœ… Checklist - What You've Configured:
  • Firebase Service Account: Backend can send notifications
  • Cloud Messaging API: Enabled for push delivery
  • Android App: Registered with google-services.json
  • iOS App: Registered with GoogleService-Info.plist
  • APN Certificate/Auth Key: iOS push notifications enabled
  • App Capabilities: Push notifications and location updates enabled

Next Steps

Your Firebase configuration is complete! Your mobile apps can now:

  • Receive push notifications via Firebase Cloud Messaging
  • Generate FCM tokens for the Bubbl SDK to use
  • Support geofencing with proper location capabilities

You can now integrate the Bubbl SDK into your apps using the CocoaPods or Manual integration guides.