Correlation types identify samples that group multiple subsamples.


The HKCorrelationType class is a concrete subclass of the HKObjectType class. To create a correlation type instance, use the object type’s correlationType(forIdentifier:) conveniance method.

Use correlation types to:

  • Request permission to read or write matching quantity samples.

  • Create and share matching quantity samples.

  • Query for matching quantity samples.

HealthKit provides two correlation types: blood pressure and food.

Using Correlation Types

Like many HealthKit classes, correlation types are not extensible and should not be subclassed.

This class reuses the same instance whenever possible. Letting multiple queries share the same workout type helps reduce the overall memory usage.


Inherits From

Conforms To

See Also

Type Objects

class HKCharacteristicType

Characteristic types represent data that does not typically change over time.

class HKQuantityType

Quantity types identify samples that store numerical values.

class HKCategoryType

Category types identify samples that contain a value from a small set of possible values.

class HKActivitySummaryType

Activity summary types identify activity summary objects.

class HKSeriesType

An identifier that indicates the type for data stored in a series sample.

class HKObjectType

The abstract superclass for all classes that identify a specific type of data when working with the HealthKit store.

class HKSampleType

An abstract superclass for all classes that identify a specific type of sample when working with the HealthKit store.