---
title: HKMetadataKeySyncVersion
framework: healthkit
role: symbol
role_heading: Global Variable
path: healthkit/hkmetadatakeysyncversion
---

# HKMetadataKeySyncVersion

The version number for a piece of data, used when updating or syncing.

## Declaration

```swift
let HKMetadataKeySyncVersion: String
```

## Discussion

Discussion This key takes an NSNumber as its value. When you save an object to the HealthKit store, the new object replaces any matching objects (existing objects with a matching HKMetadataKeySyncIdentifier value) with a lower sync version. For more information, see HKMetadataKeySyncIdentifier.

## See Also

### Sync Keys

- [HKMetadataKeySyncIdentifier](healthkit/hkmetadatakeysyncidentifier.md)
