Group Activities
Create app-specific activities your users can share and experience together.
Overview
With the Group Activities framework, you can provide your app’s content in SharePlay experiences, which create a sense of connection and immediacy for your users. For example, a video-streaming app might offer the ability to attend movie-watching parties in which participants watch simultaneously from their personal devices. The app handles the playback on each device, but the Group Activities framework synchronizes that playback and facilitates communication between the devices.
This framework leverages the FaceTime infrastructure to synchronize your app’s activities and to invite other participants to join those activities. When your app’s UI contains shareable activities, adopt the GroupActivity protocol in the objects you use to represent those activities. When a group activity begins, use the GroupSession object to synchronize your app’s behavior with other participating devices.
Topics
Essentials
Activity definition
Defining your app’s SharePlay activitiesSupporting coordinated media playbackGroupActivityGroupActivityMetadataGroupActivityActivationResultGroupActivityTransferRepresentation
Interface presentation
Presenting SharePlay activities from your app’s UIGroupActivitySharingControllerGroupActivitySharingController
Session management
Joining and managing a shared activityDrawing content in a group sessionGroupSessionCustomMessageIdentifiableParticipant
Spatial activities
Configure your visionOS app for sharing with people nearbyAdding spatial Persona support to an activityImplementing SharePlay for immersive spaces in visionOSSystemCoordinatorSystemCoordinator.ParticipantStategroupActivityAssociation(_:)GroupActivityAssociationInteractionGroupActivityAssociationKind
Custom spatial templates
Building a guessing game for visionOSSpatialTemplateSpatialTemplatePreferenceSpatialTemplateSeatElementSpatialTemplateElementSpatialTemplateElementPositionSpatialTemplateElementDirectionSpatialTemplateRole
File and data transfer
Creating a collaborative photo gallery with SharePlaySynchronizing data during a SharePlay activityGroupSessionMessengerGroupSessionJournal