Class

HKDevice

An HKDevice instance represents a device that generates data for HealthKit. These 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.

Overview

Subclassing Notes

Like many classes in HealthKit, the HKDevice class should not be subclassed.

Topics

Accessing Data About a Device

var udiDeviceIdentifier: String?

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

var firmwareVersion: String?

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

var hardwareVersion: String?

An arbitrary string representing the hardware version of the device.

var localIdentifier: String?

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

var manufacturer: String?

A string representing the device’s manufacturer.

var model: String?

A string representing the device’s model.

var name: String?

The user-facing name for the device.

var softwareVersion: String?

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

Relationships

Inherits From