vapidKeyID
The VAPID Key ID used to register the subscription, that identifies the application server with the push service.
var vapidKeyID: VAPID.Key.ID
The VAPID Key ID used to register the subscription, that identifies the application server with the push service.
var vapidKeyID: VAPID.Key.ID
import WebPush
struct Subscriber
A default subscriber implementation that can be used to decode subscriptions encoded by client-side JavaScript directly.
enum VAPID
A set of types for Voluntary Application Server Identification, also known as VAPID.
struct Key
Represents the application server’s identification key that is used to confirm to a push service that the server connecting to it is the same one that was subscribed to.
struct ID
The identifier for a private Key
’s public key.
init(_ subscriber: some SubscriberProtocol)
Cast an object that conforms to SubscriberProtocol
to a Subscriber
.
init(endpoint: URL, userAgentKeyMaterial: UserAgentKeyMaterial, vapidKeyID: VAPID.Key.ID)
Initialize a new subscriber manually.
init(from decoder: any Decoder) throws
var endpoint: URL
The push endpoint associated with the push subscription.
var id: String { get }
A safe identifier to use for the subscriber without exposing key material.
var userAgentKeyMaterial: UserAgentKeyMaterial
The key material provided by the user agent to encrupt push data with.
enum CodingKeys
The encoded representation of a subscriber.
protocol SubscriberProtocol : Sendable
Represents a subscriber registration from the browser.