Instance Method

discardWorkout()

Stops the collection of data and discards the current results without saving the workout.

Declaration

func discardWorkout()

See Also

Ending the Workout

func endCollection(withEnd: Date, completion: (Bool, Error?) -> Void)

Stops the collection of data, sets the workout’s end date, and deactivates the workout builder.

var endDate: Date?

The workout’s end date and time.

func finishWorkout(completion: (HKWorkout?, Error?) -> Void)

Creates the workout, using the samples and events added to the builder, and saves it to the HealthKit store.