Contents

quantity

The quantity for this sample.

Declaration

@NSCopying var quantity: HKQuantity { get }

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