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

# source

A HealthKit source, representing the app or device that created this object.

## Declaration

```swift
var source: HKSource { get }
```

## Discussion

Discussion The source property is only available on objects you have retrieved from the HealthKit store. When you create a new object, the source is set to nil. The system automatically sets the source property when you save the object to the HealthKit store. The source is then available the next time the object is retrieved from the store.

## See Also

### Accessing Properties

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