confirm(intent:completion:)
confirm(intent:completion:)
confirm(intent:completion:) Instance Method of INStartWorkoutIntentHandling Validates that your app is able to start the workout.
optional func confirm(intent: INStartWorkoutIntent, completion: @escaping @Sendable (INStartWorkoutIntentResponse) -> Void)Parameters
intent
The intent object that contains details about the user’s request. This object’s information has already been resolved by the user.
completion
The handler block to execute with your response. You must execute this handler while implementing this method. This handler has no return value and takes the following parameter: - term response: The `doc://com.apple.sirikit/documentation/Intents/INStartWorkoutIntentResponse object contains the status of whether your app is able to start the workout. This parameter must not be nil`.
Discussion
This method validates that your app is able to start the workout. For example, checking that a workout isn’t already in progress or that data you need for the workout is available.