Called when it is time for you to confirm the details of the cancellation.
SDKs
- iOS 10.0+
- watchOS 3.2+
Framework
- Intents
Declaration
optional func confirm(intent: INCancel Workout Intent, completion: @escaping (INCancel Workout Intent Response) -> Void)
Parameters
intent
The intent object containing details about the user’s request. Use the information in this object to get the information specified by the user.
completion
The handler block to execute with your response. You must execute this handler at some point during your implementation of this method. This handler has no return value and takes the following parameter:
- response
The
INCancel
object containing the status of whether your app is able to cancel the workout. This parameter must not beWorkout Intent Response nil
.
Discussion
Use this method to validate that your app is currently able to cancel the user’s workout. You might check to verify that a workout is currently in progress and can be canceled.