Skip to main content

Firebase Messaging

Firebase Messaging is a 3rd party service for push notifications. Push Notifications are a great way to bring back users into your app, when used correctly. It is important to maintain the right balance between effective promotion and bombarding users with distractions (which will achieve the opposite objective).

Prerequisites

Firebase apps for iOS and Android matching the bundle ID as in Zapp.

Android: Google-services.json

iOS: GoogleService-Info.plist and p.8 certificate. Please note that for push notifications the p.8 push certificate should be created on Apple Developer Portal. More info can be found here.

Android

In your application version select the drop down menu and enter the “General” section.

Once inside General, scroll down to the field Firebase Configuration And upload the Google-services.json file retrieved from your Google Firebase Console.

Add the Firebase Notifications Plugin to your application version

Uploading notifications icons

Upload the relevant assets for app notifications according to this article.

Uploading sound file for push notifications

Under the “Assets” section upload the zip file with sound file. Then match the relevant sound to the push on the Firebase Notifications Plugin.

iOS

Add the Firebase Notifications Plugin to your app.

Upload the key.p8

In your Google Firebase project, under the Settings section, upload key.p8.

Add GoogleService-Info.plist

Add the Firebase Base Setting 2.0 plugin, and upload the GoogleService-Info.plist retrieved from your Google Firebase Project in the Settings section.

Uploading notifications icons

On iOS the notifications icon is an app icon.

Uploading sound file for push notifications

Under “custom sound files” of the Firebase Notifications plugin upload the zip file with the sound files.

note

In order to test push notifications on iOS you must build the release version of the app and download it from Testflight.

Obtain FCM token for testing push notifications

FCM token (Firebase Cloud Messaging) is a unique identifier generated by Firebase Cloud Messaging for each installation of an app on a device. FCM tokens are used by the Firebase Cloud Messaging service to send push notifications to specific devices or groups of devices.

To get started make sure that you have an X-Ray plugin added to both iOS and Android app versions

Android

Once you have installed the application version on your Android device, long-press on the app icon, and a menu will pop up. Choose “Open X ray” and search through the list for the Firebase push token. Here's how to open X-Ray on your device.

The token should look like this:

Long press on it and the message that it has been copied will appear. You can then paste it to your notes.

iOS

Once you have installed the application version on your iOS device, long-press on the app icon, and a menu will pop up.

Choose “Present Logger View” and Open X-Ray Logs.

Then choose 1. Storages tab - 2. Locate the ZappPushPluginFirebase folder. Copy the token from there and save it in your notes