Skip to main content

Module push

Module push 

Source
Expand description

Apple’s push service, for reaching a koan iOS app that iOS has suspended.

A linked app is reached over its WebSocket. iOS suspends an app in the background that is not playing, and the socket dies with it; a push is the supported way back. Two kinds: a background push that wakes the app for half a minute to link and take what waits for it in the outbox, and a notification for playback, which iOS will not let a suspended app start on its own: the person taps it, the app opens and plays.

Token auth: a JWT signed with the team’s .p8 key, reused for under an hour as Apple asks. HTTP/2, which is all the gateway speaks.

Structs§

Pusher

Enums§

Outcome
What became of a push.
Push
What a push asks of the device.

Functions§

payload
The JSON a push carries. The command rides under koan, beside Apple’s aps, so the app can act on it without asking the server first.
pusher
The server’s pusher, from the config it started with; None when no key is configured, and pushes are simply not sent.