Class

HKLiveWorkoutDataSource

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

Declaration

@interface HKLiveWorkoutDataSource : NSObject

Topics

Creating a Live Data Source

- initWithHealthStore:workoutConfiguration:

Creates a new data source based on the provided workout configuration.

typesToCollect

The quantity type samples that the data source automatically sends to the workout builder.

Calculating Statistics

- enableCollectionForType:predicate:

Begins automatically calculating statistics for samples that match the quantity type and predicate.

- disableCollectionForType:

Stops automatically calculating statistics for the quantity type.

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.

HKLiveWorkoutBuilder

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