fetch Health Data For Range
Fetches health data for a range of dates in a single batch operation.
More efficient than calling fetchHealthDataByDate in a loop, as it uses fewer underlying queries by leveraging platform-specific batch APIs (e.g. a single HKStatisticsCollectionQuery per metric on iOS/watchOS).
Return
A list of HealthData objects, one per day in the range.
Parameters
The first date (inclusive) of the range.
The last date (inclusive) of the range.
Throws
if an error occurs while fetching the data.
Fetches health data for a range of dates in a single batch operation.
More efficient than calling fetchHealthDataByDate in a loop, as it uses fewer underlying queries by leveraging platform-specific batch APIs (e.g. a single HKStatisticsCollectionQuery per metric on iOS/watchOS).
Return
A list of HealthData objects, one per day in the range.
Parameters
The first date (inclusive) of the range.
The last date (inclusive) of the range.
Throws
if an error occurs while fetching the data.
Fetches health data for a range of dates in a single batch operation.
More efficient than calling fetchHealthDataByDate in a loop, as it uses fewer underlying queries by leveraging platform-specific batch APIs (e.g. a single HKStatisticsCollectionQuery per metric on iOS/watchOS).
Return
A list of HealthData objects, one per day in the range.
Parameters
The first date (inclusive) of the range.
The last date (inclusive) of the range.
Throws
if an error occurs while fetching the data.