The handler interface for canceling a workout.


protocol INCancelWorkoutIntentHandling


Use the methods of the INCancelWorkoutIntentHandling protocol to resolve, confirm, and handle requests to cancel 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 cancel the workout from your Intents extension. When your handle(intent:completion:) returns, SiriKit launches your app and passes it an NSUserActivity object containing the cancel workout intent object and your response. Your app uses the information in those objects to handle the cancellation.


Handling the Intent

Confirming the Response

func confirm(intent: INCancelWorkoutIntent, completion: (INCancelWorkoutIntentResponse) -> Void)

Called when it is time for you to confirm the details of the cancellation.

Resolving Details of the Intent

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

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


Inherits From

See Also

Cancel a Workout

class INCancelWorkoutIntent

A request to cancel an active workout.

class INCancelWorkoutIntentResponse

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