PushNotificationsProvider
@objc(ZDKPushNotificationsProvider)
public final class PushNotificationsProvider : NSObject, HasStorage, Loggable, Publisher
The ZDKPushNoticiationProvider provides APIs to subscribe to, and handle Zendesk Chat’s Push Notifications.
There are two types of chat notifications:
chat.msg- received when a new chat message was sent from an agentchat.end- received when the current chat session ends.
-
The
NSNotification.Nameassociated with the message received push notificiationDeclaration
Swift
@objc public static let ChatMessageReceivedNotification: NSNotification.Name
-
Received push notification is processed by Chat SDK.
There are two types of chat notifications:
chat.msg- received when a new chat message was sent from an agentchat.end- received when the current chat session ends.
Declaration
Swift
@objc public func didReceiveRemoteNotification(_ userInfo: [AnyHashable : Any], in application: UIApplication)Parameters
userInfoA dictionary that contains information related to the remote notification
applicationThe centralized point of control and coordination for apps running in iOS.
-
Returns
trueif received push notification belongs to Chat SDKDeclaration
Swift
@objc public func isChatPushNotification(_ userInfo: [AnyHashable : Any]) -> BoolParameters
userInfoA dictionary that contains information related to the remote notification
-
Registers device token with Zendesk Chat
Declaration
Swift
@objc public func registerPushToken(_ pushTokenData: Data)Parameters
pushTokenDatadevice token received in
didRegisterForRemoteNotificationsWithDeviceTokenafter registration. -
Registers device token with Zendesk Chat
Declaration
Swift
@objc public func registerPushTokenString(_ pushTokenString: String)Parameters
pushTokenStringdevice token received in
didRegisterForRemoteNotificationsWithDeviceTokenafter registration.
-
Unregisters for Push notifications
Declaration
Swift
@objc public func unregisterPushToken()
Install in Dash
PushNotificationsProvider Class Reference