Global Variable

HKMetadataKeyAverageSpeed

A key that indicates the average speed during a workout.

Declaration

let HKMetadataKeyAverageSpeed: String

Discussion

Set this key on a workout, workout segment, or a quantity sample that represents distance. Set its value to an HKQuantity object with a length/time unit (for example, m/s). For more information on creating complex units, see Performing Unit Math.

HealthKit assigns this metadata key to the segments it automatically creates for HKWorkoutActivityType.downhillSkiing and HKWorkoutActivityType.snowboarding workout sessions (Apple Watch Series 3 only).

See Also

Speed

let HKMetadataKeyMaximumSpeed: String

A key that indicates the maximum speed during a workout.