An object that contains configuration information about a workout session.


class HKWorkoutConfiguration : NSObject


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


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.


Inherits From

See Also


Running Workout Sessions

Track the user’s activities on Apple Watch.

class HKWorkoutSession

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

protocol HKWorkoutSessionDelegate

The session delegate protocol defines an interface for receiving notifications about errors and changes in the workout session’s state.

enum HKWorkoutSessionState

A workout session’s state.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software