<!--
{
  "availability" : [
    "iOS: 10.0.0 - 11.0.0",
    "iPadOS: 10.0.0 - 11.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 - 1.0.0",
    "watchOS: 3.0.0 - 4.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKWorkoutEvent/init(type:date:metadata:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKWorkoutEvent(cm)workoutEventWithType:date:metadata:"
  },
  "title" : "init(type:date:metadata:)"
}
-->

# init(type:date:metadata:)

Instantiates and returns a new workout event with the specified type, date, and metadata.

```
convenience init(type: HKWorkoutEventType, date: Date, metadata: [String : Any])
```

## Parameters

`type`

The type of workout event. For a description of possible events, see [`HKWorkoutEventType`](/documentation/HealthKit/HKWorkoutEventType).

`date`

The time when the transition occurred. For a pause event, this date indicates the start of the break. For a resume event, this date indicates the end of the break. You must use a date between the starting and ending dates of the workout that you intend to modify.

`metadata`

The metadata associated with the workout event.

## Discussion

---

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)