ZendeskSDKMessaging Documentation

Class Push​Notifications

public final class PushNotifications: NSObject  

The entry point to execute push notification related SDK actions. Register device token with PushNotifications.updatePushNotificationToken(:).

PushNotifications PushNotifications NSObject NSObject PushNotifications->NSObject

Conforms To




@objc public static func updatePushNotificationToken(_ token: Data)  

Update a push token to receive push notifications.


token Data

The token to be sent to the server.


@objc public static func shouldBeDisplayed(_ userInfo: [AnyHashable: Any]) -> PushResponsibility  

Check if a push notification payload belongs to Messaging and can be displayed.


user​Info [Any​Hashable:​ Any]

The push notification payload.


PushResponsbility enum indiciating if the push notification should be displayed.


@objc public static func handleTap(_ userInfo: [AnyHashable: Any], completion: ((UIViewController?) -> Void)?)  

Handles the tap of a push notification if the payload belongs to Messaging.

  • The completion is called on the main thread.

  • If Messaging is not initialized the completion will return nil.

  • If Messaging is in the process of being initialized this method will wait, and then a UIViewController will be returned.

  • If Messaging has been initialized a UIViewController will be returned.


user​Info [Any​Hashable:​ Any]

The push notification payload.

completion ((UIView​Controller?) -> Void)?

An optional UIViewController instance.