• Introduction
  • Dev Environment Setup
  • Developing Apps
  • Data Handling
  • Device Capabilities
  • Testing & Debugging
  • Extending
Warning Unreleased Docs! - You may be viewing documentation that reflects an upcoming release and the functionality described may not be in the current version you are using. Change the version above to the most recent version.

Using Firebase Cloud Messaging

Firebase Cloud Messaging (FCM)

Firebase Cloud Messaging (FCM), formerly called Google Cloud Messaging (GCM), is a free cloud service from Google that allows app developers to send notifications and messages to users across a variety of platforms, including Android, iOS and web applications. FCM is provided by Firebase, a company acquired by Google in 2014.

Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user re-engagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app. You can read more detailed description.

Rhodes Firebase Cloud Messaging Test

You can clone our sample or build your own Rhodes app for testing FCM.

Firebase Cloud Messaging Set Up

Go to https://console.firebase.google.com and create Firebase Project.

Fill project name field

Add Google analytics to your project if it you need in it

Adding iOS App to your Firebase project

You need to get the APNs Auth key (preferred) or the SSL certificate for Apple Push Notifications service (APNs). You can find more details in the article “Configuring APNs with FCM”. Also don’t forget to obtain Apple provision profile with Push Notification capability.

Press iOS icon under the caption “Get started by adding Firebase to your app” or go to Project settings and add the “Add app” button in General Settings. You can reach Project Settings by pressing the icon “Gear” on the right of the project title at the left top of screen.

Adding iOS to your Firebase project steps:

  1. Register the app.
    Copy the build.yml >> iPhone >> bundleIdentifier into the field iOS Bundle ID.


  2. Download config file.
    Download GoogleService-info.plist file and put it into the root of your Rhodes project.


  3. Add Firebase SDK.
    Just skip the step


  4. Add initialization code.
    Just skip the step


  5. Read the start guide for iOS.
    Go to the console.


Go to the Project Settings >>Cloud Messaging Settings and upload APNs Auth key, specify Key ID and you Apple development team ID.

Adding Android App to your Firebase project

Press Android icon under the caption “Get started by adding Firebase to your app” or go to Project settings and add the “Add app” button in General Settings. You can reach Project Settings by pressing the icon “Gear” on the right of the project title at the left top of screen. Adding Android to your Firebase project steps:

  1. Register the app.
    Fill the “Android package name” field.


  2. Download config file.
    Download google-service.json file and put it into the root of your Rhodes project.


  3. Add Firebase SDK
    Just skip the step


  4. Read the start guide for Android
    Go to the console.


Now all are ready for building the apps and install it on the devices.

Building Rhodes App

iOS build

Run the following commands:

rake build:iphone:setup_xcode_project

rake device:iphone:production

Open xCode and install the .ipa file to your iOS device. Run the app and it shows the device identifier. The device identifier is required for sending the push messages. It is a long string, so it will be better to copy it from the app’s logs. You can get access to the app’s logs if start the app via xCode.

Android build

Run the following command:

rake run:android:device

Run the app and it shows the device identifier. The device identifier is required for sending the push messages. It is a long string, so it will be better to copy it from the app logs. You can get access to the app’s logs by the command:

adb logcat -s APP

Send your first push notification

Go to console.firebase.google.com, open your project >> Grow >>Cloud Messaging. Press “Send your first message” button.

Fill the Notification Title and Notification Text fields, then press “Send test message” button.

Add your device identifiers for iOS app and Android App and press “Test” button. Your apps must show the received push notification.

Congratulations, You Did It!

Back to Top