<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/StartWorkoutIntent",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "App Intents"
    ],
    "preciseIdentifier" : "s:10AppIntents18StartWorkoutIntentP"
  },
  "title" : "StartWorkoutIntent"
}
-->

# StartWorkoutIntent

An App Intent for starting a workout.

```
protocol StartWorkoutIntent : InstanceDisplayRepresentable, SystemIntent
```

## Overview

On Apple Watch Ultra, this intent registers a start workout action for the
Action button. After installing your app, the user can select this action in
Settings > Action Button by setting Action to Workout and App to your app.

When implementing this intent, define the following:

- A [`title`](/documentation/AppIntents/AppIntent/title) property
- A [`workoutStyle`](/documentation/AppIntents/StartWorkoutIntent/workoutStyle-swift.property) property
- A list of [`suggestedWorkouts`](/documentation/AppIntents/StartWorkoutIntent/suggestedWorkouts)
- A  [`displayRepresentation`](/documentation/AppIntents/InstanceDisplayRepresentable/displayRepresentation) property
- A [`perform()`](/documentation/AppIntents/AppIntent/perform()) method

```swift
struct MyStartWorkoutIntent: StartWorkoutIntent {

    // Define the intent's title.
    static var title: LocalizedStringResource = "Start Workout"

    // Define a list of start workout intents that appear below the First Press
    // settings when someone sets your app as the workout app in
    // Settings > Action Button.
    static var suggestedWorkouts: [MyStartWorkoutIntent] = [MyStartWorkoutIntent()]

    // Define a parameter that specifies the type of workout that this
    // intent starts.
    @Parameter(title: "Start Workout Entity")
    var workoutStyle: WorkoutEnum

    // Define an init method that sets the default workout type.
    init() {
        workoutStyle = .workout
    }

    // Set the display representation based on the current workout style.
    var displayRepresentation: DisplayRepresentation {
        WorkoutEnum.caseDisplayRepresentations[workoutStyle] ??
        DisplayRepresentation(title: "Unknown")
    }

    // Launch your app when the system triggers this intent.
    static var openAppWhenRun: Bool { true }

    // Define the method that the system calls when it triggers this event.
    func perform() async throws -> some IntentResult {
        let workoutManager = MyWorkoutManager.shared
        await workoutManager.requestAuthorization()
        await workoutManager.startWorkout()
        return .result()
    }
}
```

> Important: When defining the ``doc://com.apple.AppIntents/documentation/AppIntents/StartWorkoutIntent/workoutStyle-swift.property``
> property, ensure that it adopts either the ``doc://com.apple.AppIntents/documentation/AppIntents/AppEnum`` or
> ``doc://com.apple.AppIntents/documentation/AppIntents/AppEntity`` protocol. Declare this property using the
> ``doc://com.apple.AppIntents/documentation/AppIntents/AppIntent/Parameter`` property wrapper.

For more information, see [Responding to the Action button on Apple Watch Ultra](/documentation/AppIntents/ActionButtonArticle).

## Topics

### Creating an intent

[`init(style: Self.WorkoutStyle)`](/documentation/AppIntents/StartWorkoutIntent/init(style:))

Creates a new intent for the specified workout style.

### Defining supported workouts

[`associatedtype WorkoutStyle : AppValue`](/documentation/AppIntents/StartWorkoutIntent/WorkoutStyle-swift.associatedtype)

The type to use for defining the intent’s workout style.

[`var workoutStyle: Self.WorkoutStyle`](/documentation/AppIntents/StartWorkoutIntent/workoutStyle-swift.property)

The workout style for the intent.

[`static var suggestedWorkouts: [Self]`](/documentation/AppIntents/StartWorkoutIntent/suggestedWorkouts)

A list of the supported workout styles.

[`static func invalidateSuggestedWorkouts()`](/documentation/AppIntents/StartWorkoutIntent/invalidateSuggestedWorkouts())

Tells the system when the list of suggested workouts changes.

## Relationships

### Inherits From

[`AppIntent`](/documentation/AppIntents/AppIntent)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomLocalizedStringResourceConvertible`](/documentation/Foundation/CustomLocalizedStringResourceConvertible)

[`SystemIntent`](/documentation/AppIntents/SystemIntent)

[`PersistentlyIdentifiable`](/documentation/AppIntents/PersistentlyIdentifiable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`InstanceDisplayRepresentable`](/documentation/AppIntents/InstanceDisplayRepresentable)

---

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)