Push Notifications

Note: Enterprise customers-only

Notification

We support Push Notifications for both Android (using Firebase) and iOS (using APN) devices. In order to enable and use Push Notifications, the following steps are required:

Android

You need to create your own project in Firebase and send to us the Server Key in your project settings > cloud messaging tab.

For instructions on how to implement Push Notifications in Android, go to Firebase Cloud Messaging.

In short, your app needs to register into FCM to get a token and save it into our database for later usage (see data/user/push endpoint). Note that this token may change, any time that happens you need to save it again in the database.

iOS

You need to configure your app for APN, follow instructions from Apple or use fastlane, and then send us both the P12 file, containing the Apple Push Notification Authentication Key, and the password to unlock it.

For instructions on how to implement Push Notifications in iOS, go to Configuring Remote Notification.

In short, your app needs to register into APN to get a token and save it into our database for later usage (see data/user/push endpoint). Note that this token may change, any time that happens you need to save it again in the database. The token returned by the iOS SDK will be a binary data object, while our backend expends a string. To turn the data into a string, use this snipped:

let tokenString = tokenData.reduce(into: "") { $0.append(String(format: "%02X", $1)) }

When receiving push notifications, additional fields that were provide in the data part when sending the notification, will be accessible to your app via the userInfo that's attached to the content of the notification. The clickAction will end up in the notification's content's categoryIdentifier.

Sending PN

If you want to send PN to your users, you first need to have your server/s IP/s address/es whitelisted in our platform. Then, you can use data/push endpoint to send notifications to a list of users (by their userID).

Notifications that we send support a title, message, sound and badge, with a ttl (time to live) value, as well as custom data which will be passed on to your apps. Be mindful of size limits imposed by Firebase or APN.