<!--
{
  "availability" : [
    "iOS: 11.2.0 -",
    "iPadOS: 11.2.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKMetadataKeyElevationAscended",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:@HKMetadataKeyElevationAscended"
  },
  "title" : "HKMetadataKeyElevationAscended"
}
-->

# HKMetadataKeyElevationAscended

A key that indicates the cumulative elevation ascended during a workout.

```
let HKMetadataKeyElevationAscended: String
```

## Discussion

Set this key on  a workout, workout segment, or a quantity sample that represents distance. Set its value to an [`HKQuantity`](/documentation/HealthKit/HKQuantity) object with a length unit.

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

---

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)