Build shared real-time experiences using GroupActivities and SharePlay for iOS, macOS, tvOS, and visionOS. Covers session lifecycle, transports, activation, and common mistakes.
Ships in all-ios-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use GroupActivities for sessions shared through FaceTime, Messages, AirDrop, or nearby visionOS participation. SharePlay owns invitation, activation, session lifecycle, participants, messaging, journals, and media-coordination handoffs.
Route Game Center authentication/matchmaking to gamekit, tabletop seats and
authoritative board state to tabletopkit, and playback UI to avkit.
Read SharePlay extended patterns when the
task needs a complete long-lived manager, typed message handling, SwiftUI
ShareLink/AirDrop integration, collaborative canvas or game state, participant
tracking, or nearby visionOS behavior.
For ordinary implementation:
GroupActivity with meaningful discovery metadata.Activity.sessions() in one long-lived manager.session.join().The capability adds com.apple.developer.group-session. A group activity is
Codable; keep it to identifiers, URLs, and concise discovery state:
import GroupActivities
struct WatchTogetherActivity: GroupActivity {
let movieID: String
let movieTitle: String
var metadata: GroupActivityMetadata {
var metadata = GroupActivityMetadata()
metadata.title = movieTitle
metadata.type = .watchTogether
metadata.fallbackURL = URL(string: "https://example.com/movie/\(movieID)")
return metadata
}
}
Use the metadata type that matches the experience (watchTogether,
listenTogether, createTogether, and so on). Add Transferable only when
using ShareLink, AirDrop, or share sheets—not merely because the activity is
Codable.
for await session in Activity.sessions() listener.join()..invalidated, cancel child tasks and release messenger, journal, and
session state.leave() exits locally; end() terminates the session for everyone. Make the
product choice explicit.| Need | Transport | Constraints |
|---|---|---|
| Small shared state/action | GroupSessionMessenger .reliable | Codable message, under 256 KB |
| High-frequency ephemeral samples | Messenger .unreliable | Loss-tolerant; do not use for authoritative turns/selections |
| Non-time-sensitive attachment | GroupSessionJournal | Transferable, available to late joiners, up to 100 MB |
| Larger/protected asset | App/server transfer | Share an identifier or manifest through SharePlay |
| AVPlayer transport state | AVPlaybackCoordinator | Do not duplicate play/pause/seek messages or snapshots |
Journal requires iOS/iPadOS/tvOS 17+, macOS 14+, or visionOS 1+. Application messages remain responsible for state outside coordinated playback.
Use GroupStateObserver.isEligibleForGroupSession to adapt the SharePlay entry
point. When a conversation is active, call prepareForActivation() and handle
.activationPreferred, .activationDisabled, and .cancelled. When no
conversation is active, present GroupActivitySharingController so the user
can choose participants.
Use the shareplay SF Symbol for custom controls and keep metadata title,
subtitle, image, and type aligned with the entry point. A disabled activation
can fall back to the local experience; it is not an error to force past.
join()..unreliable for authoritative state changes.Transferable exists only where a sharing surface requires it.sessions() and cleans up child tasks.join(); leave/end semantics are intentional.AVPlaybackCoordinator without redundant transport messages.What SKILL.md sets; muted values are Claude Code's defaults
/all-ios-skills:shareplay-activitiesfrom all-ios-skills
npx claudepluginhub thienqo/ios-skills --plugin all-ios-skills95 skills in this plugin
/accessorysetupkitDiscover and configure Bluetooth and Wi-Fi accessories using AccessorySetupKit. Use when presenting a privacy-preserving accessory picker, defining discovery descriptors for BLE or Wi-Fi devices, handling accessory session events, migrating from CoreBluetooth permission-based scanning, or setting up accessories without requiring broad Bluetooth permissions./activitykitBuild or review Live Activities and Dynamic Island experiences with ActivityKit, including lifecycle, layouts, push updates, and scheduled delivery. Use for time-sensitive Lock Screen or Dynamic Island state; route ordinary widgets to widgetkit./adattributionkitMeasure ad effectiveness with privacy-preserving attribution using AdAttributionKit. Use when registering ad impressions, handling attribution postbacks, updating conversion values, implementing re-engagement attribution, configuring publisher or advertiser apps, or replacing SKAdNetwork with AdAttributionKit for ad measurement.Other plugins' skills for the same job