<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "watchOS: 3.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriKit",
  "identifier" : "/documentation/Intents/INStartWorkoutIntent/init(workoutName:goalValue:workoutGoalUnitType:workoutLocationType:isOpenEnded:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Intents"
    ],
    "preciseIdentifier" : "s:So20INStartWorkoutIntentC7IntentsE11workoutName9goalValue0E12GoalUnitType0e8LocationK011isOpenEndedABSo17INSpeakableStringCSg_SdSgSo09INWorkoutijK0VSo0rlK0VSbSgtcfc"
  },
  "title" : "init(workoutName:goalValue:workoutGoalUnitType:workoutLocationType:isOpenEnded:)"
}
-->

# init(workoutName:goalValue:workoutGoalUnitType:workoutLocationType:isOpenEnded:)

Initializes an intent object with the specified workout information.

```
@nonobjc convenience init(workoutName: INSpeakableString? = nil, goalValue: Double? = nil, workoutGoalUnitType: INWorkoutGoalUnitType = .unknown, workoutLocationType: INWorkoutLocationType = .unknown, isOpenEnded: Bool? = nil)
```

## Parameters

`workoutName`

The name of the workout. This string can contain a custom workout name, a user-specific workout name, or one of the workout names defined in your app’s global vocabulary file.

`goalValue`

The numerical portion of the user’s goal. This parameter works in conjunction with the `workoutGoalUnitType` parameter to define the user’s workout goal.

`workoutGoalUnitType`

The units to apply to the `goalValue` parameter.

`workoutLocationType`

The workout location.

`isOpenEnded`

A Boolean indicating whether the workout ends when the specified goal is met. Specify `false` if the workout should end when the specified goal is met.

## Return Value

An initialized intent object or `nil` if the object could not be created.

## Discussion

Typically, you don’t create instances of the [`INStartWorkoutIntent`](/documentation/Intents/INStartWorkoutIntent) class yourself. Siri creates instances when the user asks to start a workout. However, you can use this method during testing to create intent objects that validate your intent handling code paths.

---

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)