Protocol

INPauseWorkoutIntentHandling

The handler interface for pausing a workout.

Overview

Use the methods of the INPauseWorkoutIntentHandling protocol to resolve, confirm, and handle requests to pause a workout using your app. Adopt this protocol in an object of your Intents extension that is capable of validating the workout name.

You do not actually pause the workout from your Intents extension. When your handle(intent:completion:) returns, SiriKit launches your app and passes it an NSUserActivity object containing the intent object and your response. Your app uses the information in those objects to pause the workout.

Topics

Handling the Intent

Confirming the Intent

func confirm(intent: INPauseWorkoutIntent, completion: (INPauseWorkoutIntentResponse) -> Void)

Called when it is time for you to confirm that you can pause the workout.

Resolving Details of the Intent

func resolveWorkoutName(for: INPauseWorkoutIntent, with: (INSpeakableStringResolutionResult) -> Void)

Called when you need to resolve the name of the workout that the user wants to pause.

Relationships

Inherits From

See Also

Pause a Workout

class INPauseWorkoutIntent

A request to pause the current workout.

class INPauseWorkoutIntentResponse

Contains your app’s response to a pause workout intent.