Skip to main content

Module push

Module push 

Source
Expand description

Push to kōan’s iOS app, through kōan’s push relay.

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. Apple accepts pushes to the app only under the developer’s key, so every server, this one included, sends them through the relay at push.koan.rocks (docs/reference/protocol/push-relay.md), which holds that key. The server holds handles the app gave it, never a device token.

Three kinds: a background push that wakes the app for half a minute to link and take what waits for it in the outbox; a notification for playback, which iOS will not let a suspended app start on its own, carrying a claim the app redeems over the link once the person taps it; and Live Activity updates for a device the phone follows.

Structs§

Pusher

Enums§

Outcome
What became of a push.
Push
What to send.

Functions§

activity_state
What a Live Activity shows of the device it follows.
differs
Whether the activity would show something different from sent. A playhead moving on time is drawn by the activity itself.
pusher
The server’s pusher, from the config it started with; None when push is turned off, and pushes are simply not sent.