Before configuring the push notifications, perform the following steps:
- Make sure that you have configured device management for your app. The device management enables you to control your apps and push notifications across multiple platforms and devices. Refer Canvas Technology - Device Management for detailed information.
Make sure that the following steps are performed to enable push notification service via Firebase Cloud Messaging (FCM):
Android or iOS build must be taken only after completing these steps.
- Create a FCM account and a project for your app.
- Create independent apps for Android and iOS within the project. And, specify the app details such as app ID, bundle ID, etc. along with the 'SHA Certificate Finger Print' for Android and 'APNs Certificates' or 'APNs Authentication Key' for iOS.
- Perform any one of the following steps:
For Android: Download the google-services.json file from FCM and place it within the parent folder of your Android app package.
For iOS: Download the GoogleService-Info.plist file from FCM and place it within iOS app package > Resources folder.
iOS - 'GoogleService-Info.plist' file download link in FCM
- Ensure that the FCM server key for your app is specified within the systempreferences.properties file.
Sample key:
#######################################################################################################
# This property will define the FCM Server Key
############################################################################################################
fcm.server.key=AAAA8vRqo9E:APA91bGAH_mayzwS8fHU2FmHdOMk_hUc0Yi3GxMcS72VN18sPBIJCKs7Wv7uauKnLScTTVH7gFWy_fKhGq20m-0fNuEhStlBarz4BCzIR
- For iOS, enable the following app properties in your local project:
- Go to App properties > Capabilities > Push Notifications and enable it.
- For iOS, enable the following app properties in your local project:
- Go to App properties > Capabilities > Background Modes and enable Remote Notifications option.