<!--
{
  "availability" : [
    "iOS: 16.2.0 -",
    "iPadOS: 16.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ActivityKit",
  "identifier" : "/documentation/ActivityKit/Activity/end(_:dismissalPolicy:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ActivityKit"
    ],
    "preciseIdentifier" : "s:11ActivityKit0A0C3end_15dismissalPolicyyAA0A7ContentVy0F5StateQzGSg_AA0a11UIDismissalE0VtYaF"
  },
  "title" : "end(_:dismissalPolicy:)"
}
-->

# end(_:dismissalPolicy:)

Ends an active Live Activity.

```
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.

## Discussion

End an active Live Activity while your app is in the foreground or while it’s in the background —
for example, by using <doc://com.apple.documentation/documentation/BackgroundTasks>.
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)