---
title: HKSource
framework: healthkit
role: symbol
role_heading: Class
path: healthkit/hksource
---

# HKSource

An object indicating the app or device that created a HealthKit sample

## Declaration

```swift
class HKSource
```

## Overview

Overview Sources include apps and devices that save data to the HealthKit store. Currently, HealthKit supports only the direct import of data from Bluetooth LE heart rate monitors. All other devices need a companion app to collect and save the data to HealthKit.

## Topics

### Getting the Current Source

- [default()](healthkit/hksource/default().md)

### Getting Property Data

- [bundleIdentifier](healthkit/hksource/bundleidentifier.md)
- [name](healthkit/hksource/name.md)

### Initializers

- [init(coder:)](healthkit/hksource/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Sources and devices

- [HKSourceQueryDescriptor](healthkit/hksourcequerydescriptor.md)
- [HKSourceRevision](healthkit/hksourcerevision.md)
- [HKDevice](healthkit/hkdevice.md)
- [HKSourceQuery](healthkit/hksourcequery.md)
