Module notifier_apns

Delivers a voip event to one PushKit token through APNs (POST https://api[.sandbox].push.apple.com/3/device/{token}, apns-push-type: voip, topic <APNS_TOPIC>.voip).

Description

Delivers a voip event to one PushKit token through APNs (POST https://api[.sandbox].push.apple.com/3/device/{token}, apns-push-type: voip, topic <APNS_TOPIC>.voip).

The JSON body is the event's data object plus notifier_event_id (and title/body from notification when given) — PushKit payloads are entirely app-defined. Remember that on iOS 13+ every PushKit push MUST be reported to CallKit by the app, so never use this for anything but an incoming call.

Response handling:

Function Index

build_headers/3APNs request headers for a VoIP push.
build_payload/1The PushKit JSON payload.
send/2

Function Details

build_headers/3

build_headers(Event::notifier_event:event(), Topic::binary(), JWT::binary()) -> [{binary(), binary()}]

APNs request headers for a VoIP push.

build_payload/1

build_payload(Event::notifier_event:event()) -> map()

The PushKit JSON payload.

send/2

send(Event::notifier_event:event(), Target::notifier_event:target()) -> notifier_dispatch:outcome()


Generated by EDoc