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

# HKMetadataKeyAppleECGAlgorithmVersion

A key for metadata indicating the version number of the algorithm Apple Watch uses to generate an ECG reading.

```
let HKMetadataKeyAppleECGAlgorithmVersion: String
```

## Discussion

Apple Watch sets this key on the [`HKElectrocardiogram`](/documentation/HealthKit/HKElectrocardiogram) samples it creates. The key is read-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)