allStatistics
A dictionary that contains all the statistics for the activity.
Declaration
var allStatistics: [HKQuantityType : HKStatistics] { get }Discussion
HealthKit calculates an HKStatistics object for each HKQuantityType, based on the HKQuantitySample objects associated with the containing workout, and falling within the workout activity’s time frame.
Furthermore, if a quantity sample extends beyond the activity’s time frame, HealthKit interpolates a quantity value to represent the portion within the time frame, and uses that value instead.