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

# source

The source for a sample.

## Declaration

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

## Discussion

Discussion This property contains an HKSource object representing the app that saved the data into the HealthKit store. The source can also represent a hardware device that writes data directly to HealthKit (for example, an iPhone, Apple Watch, or Bluetooth LE heart rate monitor). Before iOS 9.0, the companion app for other peripherals also saved device information in the object’s source property.

## See Also

### Accessing Source and Version Information

- [version](healthkit/hksourcerevision/version.md)
- [operatingSystemVersion](healthkit/hksourcerevision/operatingsystemversion.md)
- [productType](healthkit/hksourcerevision/producttype.md)
