Contents

handle(intent:completion:)

Handle pausing the workout.

Declaration

func handle(intent: INPauseWorkoutIntent, completion: @escaping  @Sendable (INPauseWorkoutIntentResponse) -> Void)
func handle(intent: INPauseWorkoutIntent) async -> INPauseWorkoutIntentResponse

Parameters

  • intent:

    The intent object that contains details about the user’s request. This object’s information has already been resolved and confirmed 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:

    response

    The Inpauseworkoutintentresponse object you create to report the status of the request. This parameter must not be nil.

Discussion

Use this method to turn control of pausing the workout to your app. When your response object contains the INPauseWorkoutIntentResponseCode.continueInApp response, SiriKit automatically launches your app and passes it the NSUserActivity object from your response object.