---
title: uuid
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkobject/uuid
---

# uuid

The universally unique identifier (UUID) for this HealthKit object.

## Declaration

```swift
var uuid: UUID { get }
```

## Discussion

Discussion HealthKit assigns a UUID to the object when you create it. If you want to add your own unique ID, add it to the object’s metadata using the HKMetadataKeyExternalUUID key.

## See Also

### Accessing Properties

- [metadata](healthkit/hkobject/metadata.md)
- [device](healthkit/hkobject/device.md)
- [sourceRevision](healthkit/hkobject/sourcerevision.md)
- [source](healthkit/hkobject/source.md)
