Protocol

INStartWorkoutIntentHandling

An interface that handles requests to start a workout.

Declaration

@protocol INStartWorkoutIntentHandling

Overview

Use the methods of the INStartWorkoutIntentHandling protocol to resolve, confirm, and handle requests to start a workout using your app. Adopt this protocol in an object of your Intents extension capable of validating the workout name or goals.

You don’t actually start a workout from your Intents extension. When your handleStartWorkout:completion: returns, Siri launches your app and passes it an NSUserActivity object that contains the INStartWorkoutIntent object and your response. Your app uses the information in those objects to start the workout.

Topics

Resolving the Intent Parameters

- resolveWorkoutNameForStartWorkout:withCompletion:

Resolves the workout name selected by the user.

- resolveGoalValueForStartWorkout:withCompletion:

Resolves the numerical goal of a user’s workout.

- resolveWorkoutGoalUnitTypeForStartWorkout:withCompletion:

Resolves the units for the user’s workout goal.

- resolveWorkoutLocationTypeForStartWorkout:withCompletion:

Resolves the location type of a user’s workout.

- resolveIsOpenEndedForStartWorkout:withCompletion:

Resolves whether the user’s workout is open ended.

Confirming the Response

- confirmStartWorkout:completion:

Validates that your app is able to start the workout.

Handling the Intent

- handleStartWorkout:completion:

Handles starting the workout.

Required.

Relationships

Inherits From

See Also

Start a Workout

INStartWorkoutIntent

A request to start a workout for the user.

INStartWorkoutIntentResponse

Your app’s response to a start workout intent.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software