Enumeration

HKQuantityAggregationStyle

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

Declaration

typedef enum HKQuantityAggregationStyle : NSInteger {
    ...
} HKQuantityAggregationStyle;

Overview

A quantity type’s aggregation style determines the type of statistics queries that you can perform. Discrete types support average, minimum, and maximum queries. Cumulative types support only sum queries. For more information, see HKStatisticsQuery.

Topics

Aggregation Styles

HKQuantityAggregationStyleCumulative

Cumulative samples that can be summed over time.

HKQuantityAggregationStyleDiscreteArithmetic

Discrete samples that can be averaged over time using an arithmetic mean.

HKQuantityAggregationStyleDiscreteTemporallyWeighted

Discrete samples that can be averaged over a time interval using a temporally weighted integration function.

HKQuantityAggregationStyleDiscreteEquivalentContinuousLevel

Discrete samples that can be combined over a time interval by computing the equivalent continuous sound level.

Deprecated Styles

HKQuantityAggregationStyleDiscrete

Discrete samples may be averaged over time.

Deprecated

See Also

Accessing Quantity Type Data

aggregationStyle

The aggregation style for the given quantity type.

- isCompatibleWithUnit:

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