<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKWorkoutSession/endCurrentActivity(on:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKWorkoutSession(im)endCurrentActivityOnDate:"
  },
  "title" : "endCurrentActivity(on:)"
}
-->

# endCurrentActivity(on:)

Ends the current workout activity.

```
func endCurrentActivity(on date: Date)
```

## Parameters

`date`

The end date and time for the activity.

## Discussion

This method asynchronously ends the current activity. HealthKit calls the session delegate’s [`workoutSession(_:didEndActivityWith:date:)`](/documentation/HealthKit/HKWorkoutSessionDelegate/workoutSession(_:didEndActivityWith:date:)) method after the activity ends. HealthKit stops collecting data related to this activity.

---

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)