Class

HKQuantityType

A type that identifies samples that store numerical values.

Declaration

@interface HKQuantityType : HKSampleType

Overview

The HKQuantityType class is a concrete subclass of the HKObjectType class. To create a quantity type instance, use the object type’s quantityTypeForIdentifier: convenience method.

Use quantity types to:

  • Request permission to read or write matching quantity samples.

  • Create and share matching quantity samples.

  • Query for matching quantity samples.

Topics

Accessing Quantity Type Data

aggregationStyle

The aggregation style for the given quantity type.

HKQuantityAggregationStyle

Constant values that describe how quantities can be aggregated over time.

- isCompatibleWithUnit:

Returns a Boolean value that indicates whether the quantity type is compatible with the given unit.

Relationships

Inherits From

See Also

Type Objects

HKCharacteristicType

A type that represents data that does not typically change over time.

HKCategoryType

A type that identifies samples that contain a value from a small set of possible values.

HKCorrelationType

A type that identifies samples that group multiple subsamples.

HKActivitySummaryType

A type that identifies activity summary objects.

HKAudiogramSampleType

A type that identifies samples that contain audiogram data.

HKSeriesType

A type that indicates the data stored in a series sample.

HKObjectType

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

HKSampleType

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

HKClinicalType

A type that identifies samples that contain clinical record data.

HKWorkoutType

A type that identifies samples that store information about a workout.