Managing Notifications

Detailed in this page is how you can set up push notifications as well as manage in-app notifications for new in-app chat messages for your iOS apps.

Push Notifications

You can enable Luciq to send your users push notifications each time you send them a new message.

Uploading Your Push Certificate

Follow the steps below to upload your push certificate to your Luciq dashboard.

  1. Go to the Push Notifications page on your Luciq dashboard and upload your .pem file.

  2. Select whether the certificate you're uploading is for development or production, and enter the pass phrase if you set one.

Handling Luciq Notifications

In application:didRegisterForRemoteNotificationsWithDeviceToken:, pass the token you get to Luciq.

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    Replies.didRegisterForRemoteNotifications(withDeviceToken: deviceToken)
}

When you receive a notification, check if it's a Luciq notification, then pass it to Luciq if necessary.

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
    let isLuciqNotification = Replies.didReceiveRemoteNotification(userInfo)
}

And finally, handle when your application has been launched from a Luciq notification. Add the following to application:didFinishLaunchingWithOptions:.

Disabling Push Notifications

Push notifications are enabled by default if you upload a push certificate to your Luciq dashboard. To disable them, use the following method.

In-App Notifications

By default, a notification will be shown on top of your app's UI when a new message is received.

circle-info

Email Notifications

If your user doesn't view the new message within 10 minutes, they will be sent an email notification as well.

Disabling In-App Notifications

Use the following method to disable notifications that appear in-app.

Getting Unread Messages Count

You can use the following method to get the number of messages a user has yet to read.

Last updated