
Shareplay Activities
Implement FaceTime- or iMessage-synced SharePlay features with GroupActivities on Apple platforms.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill shareplay-activitiesWhat is this skill?
- Covers GroupActivities setup: com.apple.developer.group-session entitlement and NSSupportsGroupActivities Info.plist
- Defines GroupActivity types, session lifecycle, and send/receive message patterns for synchronized state
- Documents coordinated media playback and starting SharePlay from the app without an active FaceTime call (iOS 17+)
- Includes GroupSessionJournal file transfer guidance and a review checklist plus common mistakes section
- Targets Swift 6.3 / iOS 26+ across iOS, macOS, tvOS, and visionOS
Adoption & trust: 1.6k installs on skills.sh; 713 GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Vercel React Native Skillsvercel-labs/agent-skills
Firebase Basicsfirebase/agent-skills
Building Native Uiexpo/skills
Firebase Ai Logic Basicsfirebase/agent-skills
Native Data Fetchingexpo/skills
Firebase Firestorefirebase/agent-skills
Journey fit
Primary fit
SharePlay is user-facing realtime UX on Apple devices, so the canonical journey shelf is Build while you implement the feature surface. GroupActivities, session lifecycle, and coordinated playback are client-side framework work—frontend mobile implementation, not backend-only APIs.
Common Questions / FAQ
Is Shareplay Activities safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Shareplay Activities
# GroupActivities / SharePlay Build shared real-time experiences using the GroupActivities framework. SharePlay connects people over FaceTime or iMessage, synchronizing media playback, app state, or custom data. Targets Swift 6.3 / iOS 26+. ## Contents - [Setup](#setup) - [Defining a GroupActivity](#defining-a-groupactivity) - [Session Lifecycle](#session-lifecycle) - [Sending and Receiving Messages](#sending-and-receiving-messages) - [Coordinated Media Playback](#coordinated-media-playback) - [Starting SharePlay from Your App](#starting-shareplay-from-your-app) - [GroupSessionJournal: File Transfer](#groupsessionjournal-file-transfer) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup ### Entitlements Add the Group Activities entitlement to your app: ```xml <key>com.apple.developer.group-session</key> <true/> ``` ### Info.plist For apps that start SharePlay without a FaceTime call (iOS 17+), add: ```xml <key>NSSupportsGroupActivities</key> <true/> ``` ### Checking Eligibility ```swift import GroupActivities let observer = GroupStateObserver() // Check if a FaceTime call or iMessage group is active if observer.isEligibleForGroupSession { showSharePlayButton() } ``` Observe changes reactively: ```swift for await isEligible in observer.$isEligibleForGroupSession.values { showSharePlayButton(isEligible) } ``` ## Defining a GroupActivity Conform to `GroupActivity` and provide metadata: ```swift import GroupActivities import CoreTransferable struct WatchTogetherActivity: GroupActivity { let movieID: String let movieTitle: String var metadata: GroupActivityMetadata { var meta = GroupActivityMetadata() meta.title = movieTitle meta.type = .watchTogether meta.fallbackURL = URL(string: "https://example.com/movie/\(movieID)") return meta } } ``` ### Activity Types | Type | Use Case | |---|---| | `.generic` | Default for custom activities | | `.watchTogether` | Video playback | | `.listenTogether` | Audio playback | | `.createTogether` | Collaborative creation (drawing, editing) | | `.workoutTogether` | Shared fitness sessions | The activity struct must conform to `Codable` so the system can transfer it between devices. ## Session Lifecycle ### Listening for Sessions Set up a long-lived task to receive sessions when another participant starts the activity: ```swift @Observable @MainActor final class SharePlayManager { private var session: GroupSession<WatchTogetherActivity>? private var messenger: GroupSessionMessenger? private var tasks = TaskGroup() func observeSessions() { Task { for await session in WatchTogetherActivity.sessions() { self.configureSession(session) } } } private func configureSession( _ session: GroupSession<WatchTogetherActivity> ) { self.session = session self.messenger = GroupSessionMessenger(session: session) // Observe session state changes Task { for await state in session.$state.values { handleState(state) } } // Observe participant changes Task { for await participants in session.$activeParticipants.values { handleParticipants(participants) } } // Join the session session.join() } } ``` ### Session States | State | Description | |---|---| | `.waiting` | Session exists but local participant has not joined | | `.joined` | Local participant is actively in the session | | `.invalidated(reason:)` | Sessio