---
title: end()
framework: groupactivities
role: symbol
role_heading: Instance Method
path: groupactivities/groupsession/end()
---

# end()

Ends the activity for the entire group and stops the transfer of synchronized data.

## Declaration

```swift
final func end()
```

## Mentioned in

Joining and managing a shared activity

## Discussion

Discussion Call this method to end the activity for all participants. When you call this method, the session transitions to the GroupSession.State.invalidated(reason:) state and stops the delivery of session-related updates. After ending the session, you can’t join it again. Don’t call this method on a session already in the GroupSession.State.invalidated(reason:) state.

## See Also

### Joining and leaving the session

- [join()](groupactivities/groupsession/join().md)
- [leave()](groupactivities/groupsession/leave().md)
