Notifications via Push Teliver sdk provides you the way to notify your customers about the events that can occur within the Operator and Consumer. Let’s see that in detail. You can know how to setup FCM in your iOS Project here.

  • Identifying Users

To send/recieve a notification to users, the device must be first identified to do so use the following method.

// Called when APNs has assigned the device a unique token
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        // Convert token to string
        let deviceTokenString = deviceToken.reduce(“”, {$0 + String(format:%02X”, $1)})
        Teliver.identifyUser(forUser: "Consumer_1", withToken: deviceTokenString)

Note: Consumer_1 here can be your user’s unique identifier in your system for identification, this will reflect under Users on dashboard. Also you can use the method available without device token.

Ref: The above view will appear on dashboard on identifying user.

  • Handling push

To handle push notification follow the steps below.

Note: Don’t forget to identify Consumer to receive push.

Last updated