---
title: GroupActivitySharingController
framework: groupactivities
role: symbol
role_heading: Class
path: groupactivities/groupactivitysharingcontroller-ybcy
---

# GroupActivitySharingController

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

## Declaration

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

## Overview

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

- [init(_:)](groupactivities/groupactivitysharingcontroller-ybcy/init(_:).md)
- [init(preparationHandler:)](groupactivities/groupactivitysharingcontroller-ybcy/init(preparationhandler:).md)

### Getting the result

- [result](groupactivities/groupactivitysharingcontroller-ybcy/result.md)
- [GroupActivitySharingResult](groupactivities/groupactivitysharingresult-2ijfu.md)

### Responding to view-related events

- [viewDidLoad()](groupactivities/groupactivitysharingcontroller-ybcy/viewdidload().md)
- [viewWillAppear(_:)](groupactivities/groupactivitysharingcontroller-ybcy/viewwillappear(_:).md)

### Instance Properties

- [modalPresentationStyle](groupactivities/groupactivitysharingcontroller-ybcy/modalpresentationstyle.md)
- [preferredContainerBackgroundStyle](groupactivities/groupactivitysharingcontroller-ybcy/preferredcontainerbackgroundstyle.md)

## Relationships

### Inherits From

- [UIViewController](uikit/uiviewcontroller.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSExtensionRequestHandling](foundation/nsextensionrequesthandling.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UIContentContainer](uikit/uicontentcontainer.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UIStateRestoring](uikit/uistaterestoring.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Interface presentation

- [Presenting SharePlay activities from your app’s UI](groupactivities/promoting-shareplay-activities-from-your-apps-ui.md)
- [GroupActivitySharingController](groupactivities/groupactivitysharingcontroller-4gtfk.md)
