Skip to main content
Push Notifications2 min read

Firebase Cloud Messaging Setup

Step-by-step: register your Android and iOS apps in Firebase, upload google-services.json and GoogleService-Info.plist, and send your first push notification.

Overview

Firebase Cloud Messaging (FCM) is Google's free push service for Android and iOS. With it, you upload two configuration files to WebAppStudio and send messages from the Firebase console.

Before you start

  • A free Firebase project.
  • Your final app identifiers: the Android package name and iOS bundle identifier. Firebase files only work for the IDs they were created with. See App identifiers.
  • For iOS: an Apple Developer account, to give Firebase an APNs key (Apple's push service).

1. Select Firebase in WebAppStudio

  1. Open Integrations › Push notifications and turn on Enable Push Notifications.
  2. Choose Firebase Cloud Messaging as the provider.

The page shows the Android package name and iOS bundle ID to register in Firebase.

2. Register the apps in Firebase

  1. In your Firebase project, add an Android app with the package name shown in WebAppStudio. Download google-services.json.
  2. Add an iOS app with the bundle ID shown in WebAppStudio. Download GoogleService-Info.plist.
  3. For iOS, upload an APNs authentication key in Firebase: Project settings › Cloud Messaging › Apple app configuration. You create the key in your Apple Developer account under Keys.

3. Upload the files

In Integrations › Push notifications, upload google-services.json in the Android slot and GoogleService-Info.plist in the iOS slot. Values such as the project ID are read from the files, so there is nothing to type.

The same files are used by the Firebase Analytics and Crashlytics plugins.

4. Save and build

Choose Save push settings and start a new build for each platform. A build stops if push is on but the file for that platform is missing or invalid.

5. Send a test message

  1. Install the new build and allow notifications.
  2. In the Firebase console, open Messaging and create a notification campaign.
  3. To open a specific page when tapped, add a custom data key url with a page of your website; see Notification links.

Next steps