---
title: "init(_:)"
framework: groupactivities
role: symbol
role_heading: Initializer
path: "groupactivities/groupactivitysharingcontroller-4gtfk/init(_:)"
---

# init(_:)

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

## Declaration

```swift
@MainActor init<ActivityType>(_ activity: ActivityType) throws where ActivityType : GroupActivity
```

## Parameters

- `activity`: The activity object to start.

## See Also

### Creating the group activity sharing controller

- [init(preparationHandler:)](groupactivities/groupactivitysharingcontroller-4gtfk/init(preparationhandler:).md)
