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

# end(using:dismissalPolicy:)

Ends an active Live Activity.

```
func end(using contentState: Activity<Attributes>.ContentState? = nil, dismissalPolicy: ActivityUIDismissalPolicy = .default) async
```

## Parameters

`contentState`

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

Include updated data in the `contentState` parameter to ensure the Live Activity shows the
latest and final content update after it ends. This is important because the Live Activity remains
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)