AGENT SKILL

ios-companion-communications

Design, route, implement, or review iOS companion and communication features using WatchConnectivity, CarPlay, App Clips, CallKit, LiveCommunicationKit, PushKit, APNs, and UserNotifications. Use when a feature spans iPhone/Watch, a vehicle screen, an App Clip/full app handoff, VoIP/calling, default calling/dialer behavior, or specialized push delivery.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
ios-companion-communications
description
Design, route, implement, or review iOS companion and communication features using WatchConnectivity, CarPlay, App Clips, CallKit, LiveCommunicationKit, PushKit, APNs, and UserNotifications. Use when a feature spans iPhone/Watch, a vehicle screen, an App Clip/full app handoff, VoIP/calling, default calling/dialer behavior, or specialized push delivery.
allowed-tools
Read, Grep, Glob, Edit, Write, Bash
last_verified
1787097600000

03 SKILL.md 正文

iOS Companion and Communications

Use this skill to keep paired-device, vehicle, App Clip, push, call, audio, server, and system-UI state separate.

Read before acting

Routing workflow

  1. Identify the user outcome: paired-device state, queued companion event, immediate companion request, vehicle glance/action, App Clip task, ordinary message, incoming VoIP call, or default calling/dialer action.
  2. Select the route by semantics: updateApplicationContext for latest Watch state, transferUserInfo for queued events, transferFile for file handoffs, sendMessage only for reachable immediate interaction; CarPlay templates for supported vehicle categories; App Clip invocation URLs for focused entry; UserNotifications for ordinary notification; PushKit only for documented VoIP/file-provider/complication uses.
  3. Draw the system boundary: activation/invocation/token -> validation/account/server reconciliation -> system-owned surface -> service/action completion -> fallback.
  4. Model separate fields for paired, installed, activated, active, reachable, queued, connected, token-registered, call-reported, call-active, stale, failed, and ended. Never reduce them to one connected Boolean.
  5. Make every payload versioned, scoped to the correct account/device, bounded, privacy-minimized, and idempotent. Persist revisions/event IDs where a duplicate side effect matters.
  6. Define unavailable/fallback behavior: no Watch, not reachable, inactive watch, CarPlay disconnect, no invocation URL, App Clip replaced by full app, push token rotation, server timeout, call rejection, audio interruption, and no system entitlement.
  7. Test the actual two-device/system surface. A simulator, mock push, local URL, or screenshot does not prove pairing, APNs, vehicle behavior, system call UI, audio, default-role eligibility, or delivery timing.

Fast path

Freeze one message, call, or notification lifecycle and one user-visible fallback. Trace sender -> transport -> system host -> receiver -> acknowledgment or expiry, then test duplicate, delayed, background, permission, revocation, and disconnect states before adding another companion surface.

Non-negotiable communication rules

  • PushKit is not a general-purpose background wake channel. For VoIP on current SDKs, report the incoming call to CallKit quickly; if the app cannot use CallKit, use UserNotifications instead.
  • A PushKit token/payload is not identity, permission, delivery, or an active call. Reconcile with the server and deduplicate call UUIDs.
  • CallKit actions are system commands. Fulfill answer/end/hold only after the underlying service/audio state is ready; fail or report an end reason honestly.
  • LiveCommunicationKit coordinates conversations and possible default roles; it does not provide the VoIP backend or guarantee broad OS/region eligibility.
  • CarPlay apps use supported templates and category rules; do not mirror an unrestricted iPhone UI or put dense editing in a driver-facing surface.
  • App Clip URLs are context, not account/payment/permission proof. Parse and validate them; handle launches without a URL; share the invocation parser with the full app.
  • Watch reachability is only immediate availability. Queued transfers are delayed/opportunistic; delivery is not server sync.
  • Keep contact, call, location, health, and vehicle metadata out of logs and shared projections unless explicitly needed and retained.

Deliverable

Produce:

  • selected route and rejected alternatives;
  • target, pairing, server, entitlement, APNs, associated-domain, and account matrix;
  • protocol envelope/reducer and state machine;
  • user-facing fallback/offline/error policy;
  • physical/two-device/system-surface evidence plan;
  • source links and unproven claims.

During implementation, preserve target boundaries and do not add server accounts, VoIP pushes, telephony/default-role entitlements, tracking, recording, or external communications without explicit need and authorization.

Related recipes

Sources

04 同仓库更多 Skills