TechnologiesCommunication, Contacts & Messaging

GroupActivities

iOSmacOStvOSwatchOSvisionOS

GroupActivities powers SharePlay shared experiences over FaceTime, letting you build activities that participants engage with together across their devices. You define an activity by conforming a type to GroupActivity, then join a GroupSession to coordinate state, observe participation through Participant and GroupStateObserver, and exchange data using GroupSessionMessenger and GroupSessionJournal. For shared experiences in visionOS, you arrange participants in space with SpatialTemplate and its associated elements, and synchronize windows and scenes through SystemCoordinator and SceneAssociationBehavior.

Defining an Activity 5

Declare a shared experience and the metadata used to present it to participants.

  • Pr
    GroupActivity
    A type that can advertise your app's activities to other participants.
  • St
    GroupActivityMetadata
    Text and image content that describes an activity to potential participants.
  • St
    GroupActivityTransferRepresentation
    A type that lets you start a group activity from a known context.
  • En
    GroupActivityActivationResult
    The result of preparing to start a custom activity.
  • En
    GroupActivitySharingResult
    The result of a request to share a group activity in iOS.

Sessions 3

Join and manage the shared session that coordinates a SharePlay activity across devices.

  • Cl
    GroupSession
    A session for an in-progress activity that synchronizes content among participant devices.
  • St
    GroupSessionEvent
    A session-related event that appears in the system UI.
  • St
    BroadcastOptions
    Options for how to broadcast media on the shared communications channel.

Participation 3

Observe who is taking part in the session and whether SharePlay is available.

  • St
    Participant
    An active participant in a group session.
  • En
    Participants
    The set of participants to include in messages.
  • Cl
    GroupStateObserver
    An object that contains information about the system’s ability to start SharePlay experiences.

Exchanging Data 3

Send messages and share larger payloads between participants in a session.

  • Cl
    GroupSessionMessenger
    An object that transfers app-specific data between the devices joined in a group session.
  • Cl
    GroupSessionJournal
    An object that manages file and data transfers between participants
  • Pr
    CustomMessageIdentifiable
    A type that assigns a custom ID string to messages you send to other devices.

Spatial Templates 9

Arrange participants in shared space for visionOS experiences.

  • Pr
    SpatialTemplate
    An interface you use to create custom arrangements of spatial Personas
  • St
    SpatialTemplateConfiguration
    A type that contains the configuration details for a spatial template.
  • St
    SpatialTemplatePreference
    A structure that specifies the preferred arrangement
  • Pr
    SpatialTemplateElement
    An interface that defines an element in your spatial template.
  • Pr
    SpatialTemplateRole
    An interface for defining roles that you assign to the
  • St
    SpatialTemplateSeatElement
    A spatial template element that represents a seat for a participant
  • St
    SpatialTemplateElementAxis
    An axis to use when aligning elements in a spatial template.
  • St
    SpatialTemplateElementDirection
    The initial direction a participant faces when an activity starts.
  • St
    SpatialTemplateElementPosition
    A type that defines the position of an element in a spatial template.

Window and Scene Coordination 3

Synchronize windows and scenes across participants in spatial experiences.

  • Cl
    SystemCoordinator
    A type you use to coordinate your interface's behavior when an
  • St
    SceneAssociationBehavior
    A type that tells the system which scene to associate with an incoming
  • St
    GroupActivityAssociationKind
    An association a user-interface element can have with a SharePlay group activity.

Classes 2

  • Cl
    GroupActivityAssociationInteraction
    An interaction configures a view's association with the current SharePlay
  • Cl
    GroupActivitySharingController
    An iOS view controller that displays the system interface for starting an

Extends 3

NSItemProviderAVPlaybackCoordinatorView
← Communication, Contacts & Messaging