Contents

HKElectrocardiogramType

A type that identifies samples containing electrocardiogram data.

Declaration

class HKElectrocardiogramType

Overview

The HKElectrocardiogramType class is a concrete subclass of the HKObjectType class. To create an electrocardiogram type instance, use the object type’s electrocardiogramType() convenience method.

Use the electrocardiogram type to:

  • Request permission to read electrocardiogram samples

  • Query for electrocardiogram samples

Electrocardiogram samples are read-only. You can request permission to read the samples using this identifier, but you can’t request authorization to share them. This means you can’t save new electrocardiogram samples to the HealthKit store. To add test data in iOS Simulator, open the Health app and select Browse > Heart > Electrocardiograms (ECG) > Add Data.

See Also

Object type subclasses