Class

HKLiveWorkoutBuilder

A builder object that constructs a workout incrementally based on live data from an active workout session.

Declaration

@interface HKLiveWorkoutBuilder : HKWorkoutBuilder

Overview

Use a live workout builder to create an HKWorkout sample during an active HKWorkoutSession. For complete instructions on running workout sessions on Apple Watch, see Running Workout Sessions.

Topics

Configuring a Live Workout Buidler.

dataSource

A data source that provides live data from a workout session automatically.

workoutSession

The workout session created by the data source and associated with this builder.

Monitoring and Controlling the Workout

delegate

The live builder’s delegate.

HKLiveWorkoutBuilderDelegate

A protocol for monitoring live workout builders.

shouldCollectWorkoutEvents

A Boolean value that determines whether the workout builder automatically adds events generated by the workout session.

Accessing Data

elapsedTime

The elapsed time for the workout based on the builder's current contents, including pauses.

Relationships

Inherits From

See Also

Sessions

Running Workout Sessions

Track a workout on Apple Watch.

HKWorkoutSession

A session that tracks the user’s workout on Apple Watch.

HKWorkoutConfiguration

An object that contains configuration information about a workout session.

HKWorkoutSessionState

A workout session’s state.

HKLiveWorkoutDataSource

A data source that automatically provides live data from an active workout session.