Contents

GroupActivitySharingController

An iOS view controller that displays the system interface for starting an activity, and optionally starts a FaceTime call for that activity.

Declaration

@MainActor @objc class GroupActivitySharingController

Overview

A GroupActivitySharingController helps you start a SharePlay activity, even when a FaceTime call isn’t currently active. When presented, the view controller prompts the person to start the activity you provided. If no FaceTime call is active, the view controller also displays a people picker to let the person select the participants for the activity. When they choose to start the activity, the view controller automatically starts the FaceTime call as needed and joins your app to the activity.

If your app’s interface includes controls to start SharePlay activities, present this view controller in response to interactions with those controls. Initialize the GroupActivitySharingController object with the activity you want to start. After you present it, the view controller handles all further interactions. It manages the interface that appears onscreen and responds when someone chooses to start or cancel the activity. It starts the FaceTime call if one isn’t currently active. It also dismisses itself and returns control back to your app, updating its result property to let you know what happened.

Topics

Creating the group activity sharing controller

Getting the result

Responding to view-related events

Instance Properties

See Also

Interface presentation