Instance Method

resolveWorkoutGoalUnitTypeForStartWorkout:withCompletion:

Resolves the units for the user’s workout goal.

Declaration

- (void)resolveWorkoutGoalUnitTypeForStartWorkout:(INStartWorkoutIntent *)intent withCompletion:(void (^)(INWorkoutGoalUnitTypeResolutionResult *resolutionResult))completion;

Parameters

intent

The intent object that contains details about the user’s request. Use this object to get the initial information, if any, provided by the user.

completion

The block to execute with the resolution. You must execute this block while implementing this method. This block has no return value and takes the following parameter:

resolutionResult

The object containing the details of your proposed resolution. For a successful resolution, create a resolution result that includes the INWorkoutGoalUnitType constant you plan to use for the workout goal.

Discussion

This method resolves the units for the user’s goal. Use it to validate the units of the user-supplied workout goal. If you don’t implement this method, SiriKit assumes that you’re able to start the workout with the specified goal.

See Also

Resolving the Intent Parameters

- resolveWorkoutNameForStartWorkout:withCompletion:

Resolves the workout name selected by the user.

- resolveGoalValueForStartWorkout:withCompletion:

Resolves the numerical goal of a user’s workout.

- resolveWorkoutLocationTypeForStartWorkout:withCompletion:

Resolves the location type of a user’s workout.

- resolveIsOpenEndedForStartWorkout:withCompletion:

Resolves whether the user’s workout is open ended.