<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WorkoutKit",
  "identifier" : "/documentation/WorkoutKit/CustomWorkout/init(activity:location:displayName:warmup:blocks:cooldown:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "WorkoutKit"
    ],
    "preciseIdentifier" : "s:10WorkoutKit06CustomA0V8activity8location11displayName6warmup6blocks8cooldownACSo21HKWorkoutActivityTypeV_So0k15SessionLocationM0VSSSgAA0A4StepVSgSayAA13IntervalBlockVGAQtcfc"
  },
  "title" : "init(activity:location:displayName:warmup:blocks:cooldown:)"
}
-->

# init(activity:location:displayName:warmup:blocks:cooldown:)

Create a new custom workout.

```
init(activity: HKWorkoutActivityType, location: HKWorkoutSessionLocationType = .unknown, displayName: String? = nil, warmup: WorkoutStep? = nil, blocks: [IntervalBlock] = [], cooldown: WorkoutStep? = nil)
```

## Parameters

`activity`

The type of activity performed during the workout.

`location`

The workout session location for the workout.

`displayName`

The name that the system uses when displaying the workout.

`warmup`

The warmup step (if any).

`blocks`

A block of repeating work and recovery steps.

`cooldown`

The cooldown step (if any).

---

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)