---
title: HKWorkoutSortIdentifierTotalDistance
framework: healthkit
role: symbol
role_heading: Global Variable
path: healthkit/hkworkoutsortidentifiertotaldistance
---

# HKWorkoutSortIdentifierTotalDistance

A constant for sorting workouts based on their total distance.

## Declaration

```swift
let HKWorkoutSortIdentifierTotalDistance: String
```

## See Also

### Specifying sort identifiers

- [HKWorkoutSortIdentifierDuration](healthkit/hkworkoutsortidentifierduration.md)
- [HKWorkoutSortIdentifierTotalEnergyBurned](healthkit/hkworkoutsortidentifiertotalenergyburned.md)
