HKWorkoutBuilder
A builder object that incrementally constructs a workout.
Declaration
class HKWorkoutBuilderOverview
Incrementally collect samples and events associated with a workout. When the workout ends, call finishWorkout(completion:) to create an HKWorkout sample and save it to the HealthKit store.
For watchOS, use an HKWorkoutSession and an HKLiveWorkoutBuilder instead.
Topics
Creating the builder
Starting the workout
Associating samples with the workout
Adding metadata to the workout
Adding events to the workout
Managing workout activities
addWorkoutActivity(_:completion:)updateActivity(uuid:adding:completion:)updateActivity(uuid:end:completion:)workoutActivities