I am familiar with HKStatisticsCollectionQuery
in HealthKit, but I am not clear how to run a query for the total number of minutes of activity in a specified time frame, rather than the total number of some QuantityType
units. Is this covered somewhere in the documentation?
Perform an HKStatisticsQuery
specifying the HKQuantityTypeIdentifierAppleExerciseTime
quantity type to get the total number of exercise minutes for a given time period.