<!--
{
  "availability" : [
    "iOS: 15.4.0 -",
    "iPadOS: 15.4.0 -",
    "macCatalyst: 15.4.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GroupActivities",
  "identifier" : "/documentation/GroupActivities/GroupActivitySharingController-ybcy",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Group Activities",
      "UIKit"
    ],
    "preciseIdentifier" : "c:@M@_GroupActivities_UIKit@objc(cs)GroupActivitySharingController"
  },
  "title" : "GroupActivitySharingController"
}
-->

# GroupActivitySharingController

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

```
@MainActor @objc class GroupActivitySharingController
```

## Overview

A [`GroupActivitySharingController`](/documentation/GroupActivities/GroupActivitySharingController-ybcy) 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`](/documentation/GroupActivities/GroupActivitySharingController-ybcy) 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`](/documentation/GroupActivities/GroupActivitySharingController-ybcy/result) property
to let you know what happened.

## Topics

### Creating the group activity sharing controller

[`init(_:)`](/documentation/GroupActivities/GroupActivitySharingController-ybcy/init(_:))

Initializes the sharing controller with the specified activity and
type information.

[`init(preparationHandler:)`](/documentation/GroupActivities/GroupActivitySharingController-ybcy/init(preparationHandler:))

Initializes the SharePlay sharing controller with a closure
that creates the activity object.

### Getting the result

[`result`](/documentation/GroupActivities/GroupActivitySharingController-ybcy/result)

The result of a request to share a group activity.

[`GroupActivitySharingResult`](/documentation/GroupActivities/GroupActivitySharingResult-2ijfu)

The result of a request to share a group activity in iOS.

### Responding to view-related events

[`viewDidLoad()`](/documentation/GroupActivities/GroupActivitySharingController-ybcy/viewDidLoad())

Notifies the view controller that the system added a view to a view hierarchy.

[`viewWillAppear(_:)`](/documentation/GroupActivities/GroupActivitySharingController-ybcy/viewWillAppear(_:))

Notifies the view controller that the system is going to add a view to a view hierarchy.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)