<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKQuantityTypeIdentifier/distanceCycling",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:@HKQuantityTypeIdentifierDistanceCycling"
  },
  "title" : "distanceCycling"
}
-->

# distanceCycling

A quantity sample type that measures the distance the user has moved by cycling.

```
static let distanceCycling: HKQuantityTypeIdentifier
```

## Discussion

These samples use length units (described in [`HKUnit`](/documentation/HealthKit/HKUnit)) and measure cumulative values (described in [`HKQuantityAggregationStyle`](/documentation/HealthKit/HKQuantityAggregationStyle)). During outdoor cycling workouts, the system automatically records distance samples on Apple Watch. During indoor cycling workouts, the system automatically records distance samples on Apple Watch when connected to a peripheral that provides cycling speed. Sample data may be condensed and/or coalesced by HealthKit. For more information, see <doc://com.apple.healthkit/documentation/HealthKit/accessing-condensed-workout-samples>.

## See Also

[`HKQuantityTypeIdentifier`](/documentation/HealthKit/HKQuantityTypeIdentifier)

The identifiers that create quantity type objects.

[`HKQuantitySample`](/documentation/HealthKit/HKQuantitySample)

A sample that represents a quantity, including the value and the units.

[`HKQuantity`](/documentation/HealthKit/HKQuantity)

An object that stores a value for a given unit.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)