Proactive messaging can deliver targeted local push notifications to your users through your mobile SDK channel when triggering pre-defined conditions. See Creating proactive messages for mobile SDK channels for information on creating a proactive messaging campaign for your channel. The steps mentioned in the article should be completed before performing the steps below.

Local push notifications

Proactive messaging uses iOS local notifications to deliver messages to users that meet your pre-defined conditions.

The ZendeskSDK will request notification permission from the user (if they haven't been prompted previously) so a proactive message can be displayed.

Follow the steps in implementing push notifications in your app's codebase to ensure your project can handle the push notifications actions correctly.
You must implement the handleTap function inside userNotificationCenter(didReceive) to display the conversation view after the end user taps on the proactive Message notification.

You can find a demo app demonstrating the capability in our Zendesk SDK Demo app on GitHub.

Swift

PushNotifications.handleTap(userInfo) { viewController in    // Handle displaying the returned viewController in here}

Objective-C

[ZDKPushNotifications handleTap:userInfo completion:^(UIViewController * _Nullable viewController) {    // Handle displaying the returned viewController in here}];

Relationship with the Page View event

A proactive messaging campaign is evaluated when triggered by the Page View Event integration. It is essential that for each screen the user visits, the page view event is correctly updated to reflect this. For example, suppose you have a campaign that triggers when the user is on a particular product screen for 30 seconds. If the user navigates to a different screen after 25 seconds, and there's no subsequent page view event sent, the user will receive a proactive message notification.