Class

HKWorkoutConfiguration

An object that contains configuration information about a workout session.

Declaration

class HKWorkoutConfiguration : NSObject

Overview

Like many HealthKit classes, the HKWorkoutConfiguration class is not extendable and should not be subclassed.

Topics

Session Settings

var activityType: HKWorkoutActivityType

The workout session’s activity type.

var locationType: HKWorkoutSessionLocationType

The workout session’s location.

enum HKWorkoutSessionLocationType

A constant indicating whether the workout session takes place indoors or outdoors.

var swimmingLocationType: HKWorkoutSwimmingLocationType

The workout session’s swimming location.

enum HKWorkoutSwimmingLocationType

The possible locations for swimming.

var lapLength: HKQuantity?

The length of the lap for a workout session.

Relationships

Inherits From

See Also

Sessions

Running Workout Sessions

Track a workout on Apple Watch.

SpeedySloth: Creating a Workout

Use the Workout Builder API to start, stop, and to save workouts on Apple Watch.

class HKWorkoutSession

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

enum HKWorkoutSessionState

A workout session’s state.

class HKLiveWorkoutBuilder

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

class HKLiveWorkoutDataSource

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