Initializes an intent object with the specified workout information.
- iOS 10.0+
- Mac Catalyst 13.0+
- watchOS 3.2+
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.
The numerical portion of the user’s goal. This parameter works in conjunction with the
workoutparameter to define the user’s goal for the workout.
Goal Unit Type
The units to apply to the
The location of the workout.
A Boolean indicating whether the workout ends when the specified goal is met. Specify
NOif the workout should end when the specified goal is met.
An initialized intent object or
nil if the object could not be created.
Normally, you do not create instances of this class yourself. Instead, Siri creates instances when the user asks to start a workout. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.