Instance Property

quantity

The quantity for this sample.

Declaration

@property(readonly, copy) HKQuantity *quantity;

Discussion

If the sample contains more than one quantity, this property returns the sum or average, depending on the sample’s aggregation style (sum for cumulative, average for discrete). To access the individual quantities, use an HKQuantitySeriesSampleQuery.

To see the type of units compatible with this quantity, look up the sample’s quantity type identifier in HKQuantityTypeIdentifier.

See Also

Getting Property Data

count

The number of quantities contained in this sample.

quantityType

The quantity type for this sample.