Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Shareplay Activities

ASecurity

Build shared real-time experiences using GroupActivities and SharePlay. Use when implementing shared media playback, collaborative app features, synchronized game state, or any FaceTime, Messages, AirDrop, or nearby visionOS group activity on iOS, macOS, tvOS, or visionOS.

3 stars
0 votes
0 copies
0 views
Added 9/28/2026
developmentswiftdocumentation

Works with

cli

Security Analysis

A100/100

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add thiennc-tesoglobal/ios-skills --skill shareplay-activities --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shareplay Activities?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Shareplay Activities
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/thiennc-tesoglobal-shareplay-activities/badge)](https://www.skillsdirectory.com/skills/thiennc-tesoglobal-shareplay-activities)

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: shareplay-activities
description: "Build shared real-time experiences using GroupActivities and SharePlay. Use when implementing shared media playback, collaborative app features, synchronized game state, or any FaceTime, Messages, AirDrop, or nearby visionOS group activity on iOS, macOS, tvOS, or visionOS."
---

# GroupActivities and SharePlay

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`.

## Contents

- [Choose the workflow](#choose-the-workflow)
- [Setup and activity contract](#setup-and-activity-contract)
- [Session lifecycle](#session-lifecycle)
- [Choose a transport](#choose-a-transport)
- [Activation and UI](#activation-and-ui)
- [Common mistakes](#common-mistakes)
- [Review checklist](#review-checklist)
- [References](#references)

## Choose the workflow

Read [SharePlay extended patterns](references/shareplay-patterns.md) 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:

1. Add Group Activities capability to the app target; do not add it to widgets,
   extensions, or App Clips.
2. Define a small `GroupActivity` with meaningful discovery metadata.
3. Own `Activity.sessions()` in one long-lived manager.
4. Configure observers and transports before `session.join()`.
5. Choose messenger, journal, or AV playback coordination according to the data.
6. Handle late join, leave, end, and invalidation explicitly.

## Setup and activity contract

The capability adds `com.apple.developer.group-session`. A group activity is
Codable; keep it to identifiers, URLs, and concise discovery state:

```swift
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.

## Session lifecycle

- Start one long-lived `for await session in Activity.sessions()` listener.
- Store the session, create its messenger/journal, subscribe to state and active
  participants, then call `join()`.
- On `.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.
- Track participant-set differences and send an authoritative current-state
  snapshot to late joiners.
- Do not put the session listener in a SwiftUI view body or another object that
  is recreated during navigation.

## Choose a transport

| 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.

## Activation and UI

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.

## Common Mistakes

- Receiving a session but never calling `join()`.
- Leaving child observation tasks alive after invalidation.
- Broadcasting deltas without bootstrapping late joiners.
- Sending large attachments through the messenger.
- Using `.unreliable` for authoritative state changes.
- Manually synchronizing AVPlayer transport after attaching its playback coordinator.
- Presenting only a FaceTime-active path and omitting participant selection.

## Review Checklist

- [ ] Capability belongs to the app target only.
- [ ] Activity payload is small, Codable, and has accurate metadata.
- [ ] `Transferable` exists only where a sharing surface requires it.
- [ ] One long-lived owner observes `sessions()` and cleans up child tasks.
- [ ] Session configuration precedes `join()`; leave/end semantics are intentional.
- [ ] Participant changes trigger late-join state bootstrap.
- [ ] Messenger delivery mode and size fit the message semantics.
- [ ] Journal or app-managed transfer handles larger assets.
- [ ] AV media uses `AVPlaybackCoordinator` without redundant transport messages.
- [ ] Eligibility, activation result, and no-conversation sharing UI are handled.

## References

- [SharePlay extended patterns](references/shareplay-patterns.md)
- [GroupActivities documentation](https://sosumi.ai/documentation/groupactivities)
- [GroupSession](https://sosumi.ai/documentation/groupactivities/groupsession)
- [GroupSessionMessenger](https://sosumi.ai/documentation/groupactivities/groupsessionmessenger)
- [GroupSessionJournal](https://sosumi.ai/documentation/groupactivities/groupsessionjournal)
- [SharePlay HIG](https://sosumi.ai/design/human-interface-guidelines/shareplay)

Attribution

thiennc-tesoglobalthiennc-tesoglobal
View sourceMore from thiennc-tesoglobal →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284972 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10311 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →