Class

HKDevice

A device that generates data for HealthKit.

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

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

See Also

Sources and Devices

class HKSourceRevision

An object indicating the source of a HealthKit sample.

class HKSource

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

class HKSourceQuery

A query that returns a list of sources (apps and devices) that have saved matching queries to the HealthKit store.