PushNotificationData

@objc(ZDKPushNotificationData)
public final class PushNotificationData : NSObject
  • Declaration

    Swift

    @objc(ZDKPushNotificationType)
    public enum PushNotificationType : Int
  • type of PushNotification, can be either chatEnded or message

    Declaration

    Swift

    @objc
    public let type: PushNotificationType
  • raw payload from received remote push notification

    Declaration

    Swift

    @objc
    public let userInfo: [AnyHashable : Any]
  • Instantiates the Data object from given push notification payload

    Declaration

    Swift

    @objc
    public static func data(for userInfo: [AnyHashable : Any]) -> PushNotificationData?

    Parameters

    userInfo

    Push notification payload

    Return Value

    type-safe push notification object

  • Returns true if the push notification payload belongs to Chat

    Declaration

    Swift

    @objc
    public static func isChatPushNotification(userInfo: [AnyHashable : Any]) -> Bool

    Parameters

    userInfo

    Push notification payload

Equatable

  • Returns a Boolean value that indicates whether the receiver and a given object are equal.

    Declaration

    Swift

    @objc
    override public func isEqual(_ object: Any?) -> Bool

    Parameters

    object

    the object to compare against