enablePush(push_service:endpoint:p256dh:auth:grace:vapid_private_pkcs8:claims:)

Enable push notifications

func enablePush(push_service: String, endpoint: String, p256dh: Array<UInt8>, auth: Array<UInt8>, grace: Int32, vapid_private_pkcs8: Array<UInt8>? = nil, claims: Array<String>? = nil)

Parameters

push_service

the address of a push proxy

endpoint

the final target for the push proxy to forward to

p256dh

A P-256 uncompressed point in ANSI X9.62 format

auth

Random 16 octed value

grace

Grace period during which not to generate push if another app is active for same account, in seconds (negative for none)

vapid_private_pkcs8

the private key for signing JWT of the push service

claims

Optional additional JWT claims as key then value