<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKDevice",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKDevice"
  },
  "title" : "HKDevice"
}
-->

# HKDevice

A device that generates data for HealthKit.

```
class HKDevice
```

## 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`](/documentation/HealthKit/HKDevice) object, and they cannot change.

## Topics

### Creating Device Objects

[`-  initWithName:manufacturer:model:hardwareVersion:firmwareVersion:softwareVersion:localIdentifier:UDIDeviceIdentifier:`](/documentation/HealthKit/HKDevice/init(name:manufacturer:model:hardwareVersion:firmwareVersion:softwareVersion:localIdentifier:udiDeviceIdentifier:)-3663q)

Initializes a new device object.

[`+  localDevice`](/documentation/HealthKit/HKDevice/local())

returns a device object that represents the current device.

### Accessing Data About a Device

[`UDIDeviceIdentifier`](/documentation/HealthKit/HKDevice/udiDeviceIdentifier)

The device identifier portion of the US Food and Drug Administration’s Unique Device Identifier (UDI).

[`firmwareVersion`](/documentation/HealthKit/HKDevice/firmwareVersion)

An arbitrary string representing the current version of the firmware running on the device.

[`hardwareVersion`](/documentation/HealthKit/HKDevice/hardwareVersion)

An arbitrary string representing the hardware version of the device.

[`localIdentifier`](/documentation/HealthKit/HKDevice/localIdentifier)

An identifier that uniquely identifies the device object on the hardware running this code.

[`manufacturer`](/documentation/HealthKit/HKDevice/manufacturer)

A string representing the device’s manufacturer.

[`model`](/documentation/HealthKit/HKDevice/model)

A string representing the device’s model.

[`name`](/documentation/HealthKit/HKDevice/name)

The user-facing name for the device.

[`softwareVersion`](/documentation/HealthKit/HKDevice/softwareVersion)

An arbitrary string representing the version of the software running on the device.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Sendable`](/documentation/Swift/Sendable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)