---
name: live-activities
description: Implement iOS Live Activities with notification.dev, including ActivityKit widgets, installation token registration, and backend start/update/end requests. Use for integrating or troubleshooting Live Activities in a customer app.
---

# Live Activities integration

Read [references/integration.md](references/integration.md) before implementing.
It contains the supported API contracts, Swift examples, lifecycle rules, and
device verification steps. Resolve the reference relative to this skill's URL,
or load `skill://live-activities/references/integration.md` through MCP resources.

Inspect the customer's iOS app and backend before editing. Use the project ID and
API origin supplied by the user. For connected workspace changes, verify the
approved project with `list_projects`; do not substitute another project.

## Integration boundaries

- The customer implements the ActivityKit widget. notification.dev supplies HTTP
  APIs and examples; do not assume native SDK Live Activity wrappers exist.
- Reuse the project's existing APNs provider. Use the main app bundle ID, not the
  widget extension's ID. Local starts require iOS 16.1+; remote starts iOS 17.2+.
- ActivityKit tokens are separate from ordinary push tokens. Register them with
  the installation credential and current association ID; handle rotation,
  unregistering, and identity changes as documented.
- Keep project API keys on the customer's backend. Authorize the current user and
  installation before issuing a local-start registration grant. External user IDs
  alone do not establish ownership.
- Server mutations use `messages:send`, operation polling also needs
  `project:read`, and reporting needs `reports:read`. Use the HTTP Live Activities
  endpoints in the reference; do not invent dedicated Live Activities MCP tools.
- Use a new project-scoped activity ID for each business event. Ended IDs cannot
  be reused. Keep retry idempotency keys stable for the same request and body.
- Updates replace the complete content state and must match the compiled Swift
  model. The complete APNs payload must fit within 4,096 UTF-8 bytes.

## Verification

Test widget decoding, token registration/rotation, and start/update/end behavior
using the app's existing test patterns. Verify on a supported physical iPhone
when one is available; explain remaining signing, capability, or device steps.
Inspect activity send and delivery reports for failures. APNs acceptance does not
confirm receipt or display. Keep real sends and provider/key changes within the
user's authorized project and test-device scope.
