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
- Inspect the actual iPhone/Watch/App Clip/CarPlay targets, bundle identifiers, deployment targets, scene manifests, entitlements, capabilities, associated domains, App Groups, APNs environment, server contract, and audio/session adapters.
- Read the networking/companion route, Watch/CarPlay/App Clip deep dive, Watch Connectivity state deep dive, and communication surfaces card.
- Refresh the exact official framework pages in the Sources section before relying on current OS/region/device availability, an entitlement, push rule, or system-owned UI behavior.
Routing workflow
- 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.
- Select the route by semantics:
updateApplicationContextfor latest Watch state,transferUserInfofor queued events,transferFilefor file handoffs,sendMessageonly 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. - Draw the system boundary:
activation/invocation/token -> validation/account/server reconciliation -> system-owned surface -> service/action completion -> fallback. - 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
connectedBoolean. - 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.
- 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.
- 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
- Watch, CarPlay, App Clip, and communication recipes
- Watch/CarPlay/App Clip deep dive
- Watch Connectivity and multiplatform state
- System-surface checklist
- Build/device/release checklist
Sources
- Watch Connectivity
- WCSession
- WCSessionDelegate
- Transferring data with Watch Connectivity
- CarPlay
- CPTemplateApplicationScene
- CPInterfaceController
- Displaying content in CarPlay
- App Clips
- Responding to invocations
- CallKit
- CXProvider
- Making and receiving VoIP calls
- LiveCommunicationKit
- PushKit
- PKPushRegistry
- Responding to VoIP Notifications from PushKit
- UserNotifications
04 同仓库更多 Skills
no-description
暂无简介
good-skill
Fixture skill that satisfies every rule.
broken-link
Links to a reference file that does not exist.
Bad_Name
Name violates the kebab-case rule and does not match the directory.
skill-authoring
Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.
weigh-bags
Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts/reconcile.py.