helloB
helloB

Reputation: 3582

How to query health kit for total activity minutes by day?

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?

Upvotes: 0

Views: 1368

Answers (1)

Allan
Allan

Reputation: 7343

Perform an HKStatisticsQuery specifying the HKQuantityTypeIdentifierAppleExerciseTime quantity type to get the total number of exercise minutes for a given time period.

Upvotes: 1

Related Questions