---
title: HKDevice
framework: healthkit
role: symbol
role_heading: Class
path: healthkit/hkdevice
---

# HKDevice

A device that generates data for HealthKit.

## Declaration

```swift
class HKDevice
```

## Mentioned in

About the HealthKit framework

## Overview

Overview Devices include Apple Watch, iPhone, and any other health or fitness peripherals that produce the sample data stored in HealthKit. Device objects are immutable: You set the device’s properties when you create the HKDevice object, and they cannot change.

## Topics

### Creating Device Objects

- [init(name:manufacturer:model:hardwareVersion:firmwareVersion:softwareVersion:localIdentifier:udiDeviceIdentifier:)](healthkit/hkdevice/init(name:manufacturer:model:hardwareversion:firmwareversion:softwareversion:localidentifier:udideviceidentifier:)-3663q.md)
- [local()](healthkit/hkdevice/local().md)

### Accessing Data About a Device

- [udiDeviceIdentifier](healthkit/hkdevice/udideviceidentifier.md)
- [firmwareVersion](healthkit/hkdevice/firmwareversion.md)
- [hardwareVersion](healthkit/hkdevice/hardwareversion.md)
- [localIdentifier](healthkit/hkdevice/localidentifier.md)
- [manufacturer](healthkit/hkdevice/manufacturer.md)
- [model](healthkit/hkdevice/model.md)
- [name](healthkit/hkdevice/name.md)
- [softwareVersion](healthkit/hkdevice/softwareversion.md)

### Initializers

- [init(coder:)](healthkit/hkdevice/init(coder:).md)
- [init(name:manufacturer:model:hardwareVersion:firmwareVersion:softwareVersion:localIdentifier:UDIDeviceIdentifier:)](healthkit/hkdevice/init(name:manufacturer:model:hardwareversion:firmwareversion:softwareversion:localidentifier:udideviceidentifier:)-6cari.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)
- [HKSource](healthkit/hksource.md)
- [HKSourceQuery](healthkit/hksourcequery.md)
