---
title: "end(_:dismissalPolicy:)"
framework: activitykit
role: symbol
role_heading: Instance Method
path: "activitykit/activity/end(_:dismissalpolicy:)"
---

# end(_:dismissalPolicy:)

Ends an active Live Activity.

## Declaration

```swift
func end(_ content: ActivityContent<Activity<Attributes>.ContentState>?, dismissalPolicy: ActivityUIDismissalPolicy = .default) async
```

## Parameters

- `content`: The latest and final dynamic content for the Live Activity that ended. The size of the encoded content can’t exceed 4KB in size.
- `dismissalPolicy`: Describes how and when the system should dismiss a Live Activity and and remove it from the Lock Screen.

## Mentioned in

Displaying live data with Live Activities

## Discussion

Discussion End an active Live Activity while your app is in the foreground or while it’s in the background — for example, by using Background Tasks. When you end a Live Activity, include a final content update using the content parameter to ensure the Live Activity shows the latest and final content update after it ends. This is important because the Live Activity may remain visible until the system or the person removes it.

## See Also

### Ending a Live Activity

- [ActivityUIDismissalPolicy](activitykit/activityuidismissalpolicy.md)
- [end(_:dismissalPolicy:timestamp:)](activitykit/activity/end(_:dismissalpolicy:timestamp:).md)
