A sample that represents a cumulative quantity.
- iOS 13.0+Beta
- watchOS 6.0+Beta
A quantity sample contains one or more
HKQuantity objects. Each quantity represents a single piece of data with a single numeric value and the value’s associated units. Use these samples to store data that accumulates over time, such as step count, active energy burned, or walking distance.
HKCumulative class is a concrete subclass of the
HKQuantity class. Cumulative quantity samples are immutable; you set the sample’s properties when you create it, and they cannot change.