Class

HKDevice

A device that generates data for HealthKit.

Declaration

@interface HKDevice : NSObject

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

+ localDevice

returns a device object that represents the current device.

Accessing Data About a Device

UDIDeviceIdentifier

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

firmwareVersion

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

hardwareVersion

An arbitrary string representing the hardware version of the device.

localIdentifier

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

manufacturer

A string representing the device’s manufacturer.

model

A string representing the device’s model.

name

The user-facing name for the device.

softwareVersion

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

Relationships

Inherits From

See Also

Sources and Devices

HKSourceRevision

An object indicating the source of a HealthKit sample.

HKSource

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

HKSourceQuery

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