PushNotificationKeyStorage

public protocol PushNotificationKeyStorage : AnyObject

Undocumented

  • Persist the encryption key in local persistent storage.

    Declaration

    Swift

    func onPersistKey(_ encryptionKey: String, expiryTime: Date) throws

    Parameters

    encryptionKey

    a string which contains two keys. The first half is the key for authorization and the second half is the key for encryption. It is generated by chat sdk.

    expiryTime

    45 minutes after the key is created. This time is generated by chat sdk.

  • Retrieve the valid keys previously stored in local persistent storage.

    Declaration

    Swift

    func onRetrieveKeys() throws -> [String]
  • This method is used to decrypt notification payload in notification service extension.

    Declaration

    Swift

    public func decryptPayload(
        notification: [AnyHashable: Any]
    ) throws -> PushNotificationEvent

    Parameters

    notification

    The APNS push notification payload ( including “aps” and “data” )