HealthKit Sort Descriptors

Identifiers for sorting results.

Topics

Sample Sort Identifiers

let HKSampleSortIdentifierStartDate: String

A constant for sorting samples based on their start date.

let HKSampleSortIdentifierEndDate: String

A constant for sorting samples based on their end date.

Workout Sort Identifiers

let HKWorkoutSortIdentifierDuration: String

A constant for sorting workouts based on their duration.

let HKWorkoutSortIdentifierTotalDistance: String

A constant for sorting workouts based on their total distance.

let HKWorkoutSortIdentifierTotalFlightsClimbed: String

A constant for sorting workouts based on the number of flights of steps climbed.

let HKWorkoutSortIdentifierTotalEnergyBurned: String

A constant for sorting workouts based on the total energy burned.

let HKWorkoutSortIdentifierTotalSwimmingStrokeCount: String

A constant for sorting workouts based on the number of swimming strokes.

See Also

Creating Sample Queries

Executing Sample Queries

Create, run, and sort sample queries.

let HKObjectQueryNoLimit: Int

A value indicating that the query returns all the matching samples in the HealthKit store.