---
title: "registerGroupActivity(preparationHandler:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsitemprovider/registergroupactivity(preparationhandler:)"
---

# registerGroupActivity(preparationHandler:)

Registers a group activity instance asynchronously with the specified options.

## Declaration

```swift
@nonobjc func registerGroupActivity<ActivityType>(preparationHandler: @escaping () async throws -> ActivityType) where ActivityType : GroupActivity
```

## Parameters

- `preparationHandler`: The handler the service invokes when it registers the GroupActivity.

## See Also

### Registering group activities

- [registerGroupActivity(_:)](foundation/nsitemprovider/registergroupactivity(_:).md)
