---
title: StartWorkoutIntent
framework: appintents
role: symbol
role_heading: Protocol
path: appintents/startworkoutintent
---

# StartWorkoutIntent

An App Intent for starting a workout.

## Declaration

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

## Mentioned in

Responding to the Action button on Apple Watch Ultra

## Overview

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 property A workoutStyle property A list of suggestedWorkouts A  displayRepresentation property A perform() method 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 workoutStyle property, ensure that it adopts either the AppEnum or AppEntity protocol. Declare this property using the AppIntent.Parameter property wrapper. For more information, see Responding to the Action button on Apple Watch Ultra.

## Topics

### Creating an intent

- [init(style:)](appintents/startworkoutintent/init(style:).md)

### Defining supported workouts

- [WorkoutStyle](appintents/startworkoutintent/workoutstyle-swift.associatedtype.md)
- [workoutStyle](appintents/startworkoutintent/workoutstyle-swift.property.md)
- [suggestedWorkouts](appintents/startworkoutintent/suggestedworkouts.md)
- [invalidateSuggestedWorkouts()](appintents/startworkoutintent/invalidatesuggestedworkouts().md)

## Relationships

### Inherits From

- [AppIntent](appintents/appintent.md)
- [CustomLocalizedStringResourceConvertible](foundation/customlocalizedstringresourceconvertible.md)
- [InstanceDisplayRepresentable](appintents/instancedisplayrepresentable.md)
- [PersistentlyIdentifiable](appintents/persistentlyidentifiable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SystemIntent](appintents/systemintent.md)

## See Also

### Workout support

- [PauseWorkoutIntent](appintents/pauseworkoutintent.md)
- [ResumeWorkoutIntent](appintents/resumeworkoutintent.md)
