---
title: activate()
framework: groupactivities
role: symbol
role_heading: Instance Method
path: groupactivities/groupactivity/activate()
---

# activate()

Begins the activity immediately and creates a session for the app when a FaceTime call is active.

## Declaration

```swift
func activate() async throws -> Bool
```

## Mentioned in

Configure your visionOS app for sharing with people nearby Presenting SharePlay activities from your app’s UI

## Discussion

Discussion Typically, you call this method only when the prepareForActivation() method delivers the GroupActivityActivationResult.activationPreferred result. However, you may call it directly if your activity only makes sense in a group setting. For example, call it if the activity applies only to groups and can’t be performed without other participants. If a FaceTime call is active, this method configures a session. The system also invites other participants to join the activity. If a session will be delivered to your app this function returns true, otherwise it returns false. A case where this function could return false is when a session is created and handed off to an Apple TV. If a call isn’t active or a session wasn’t created, this method throws an error

## See Also

### Starting an activity immediately

- [prepareForActivation()](groupactivities/groupactivity/prepareforactivation().md)
- [GroupActivityActivationResult](groupactivities/groupactivityactivationresult.md)
