← all adapters

apple-apns-style

simulates Apple Push Notification service (APNs) v2

restadapter v0.1.02 routes

verification

VMVM tier — no SDK suite yet· surface 2 · not implemented 4 · differs 3

use it

# add to stunt.yaml
services:
  apple-apns:
    adapter: embedded:apple-apns-style

# then
$ stunt up

The embedded: source extracts this adapter from the binary — no git clone, fully offline.

how to mock the Apple Push Notification service (APNs) API locally

Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of Apple Push Notification service (APNs). It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real Apple Push Notification service (APNs) v2 surface — the data is fake, the behavior is real.

backing stores

devicesnotifications

api surface (2)

generated from the adapter manifest — exactly what boots, nothing more

2 routes
POST/3/device/{deviceToken}
GET/3/device/{deviceToken}/notifications

VM-verified behaviors (5)

  • the provider token gate distinguishes missing invalid and expired tokens
  • a push to the known device returns 200 with a canonical uuid apns-id
  • unknown device tokens are 400 baddevicetoken
  • empty aps payloads are 400 payloadempty
  • sent notifications are retrievable per device

Not implemented (4)

  • No apns-topic, apns-push-type, apns-priority, or apns-collapse-id handling
  • No provider-certificate auth — only JWT provider tokens
  • No 429 TooManyRequests or 503 ServiceUnavailable rate-limit responses
  • No Web Push endpoints (Safari webpush) or VOIP push handling

Differs from the real API (3)

  • Provider JWT verified against one fixed P-256 key whose private half is published
  • GET /3/device/{token}/notifications is a simulator-only endpoint (no real fetch API)
  • sent_at on the notifications endpoint is a constant; 410 Unregistered is modeled but unreachable
want more of the Apple Push Notification service (APNs) surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.