Instance Property


An array of workout event objects.


var workoutEvents: [HKWorkoutEvent]? { get }


This array specifies when the user has paused and resumed the workout activity. This method calculates the workout’s duration based on the amount of active time between the provided start and end dates. For more information on workout events, see HKWorkoutEvent.

See Also

Accessing Property Data

var duration: TimeInterval

The workout’s duration.

var totalDistance: HKQuantity?

The total distance traveled during the workout.

var totalEnergyBurned: HKQuantity?

The total active energy burned during the workout.

var workoutActivityType: HKWorkoutActivityType

The type of activity performed during the workout.

var totalFlightsClimbed: HKQuantity?

The total number of flights of stairs climbed during the workout.

var totalSwimmingStrokeCount: HKQuantity?

The total stroke count for the workout.