Calculates the active and resting energy burned based on the total energy burned over the given duration.
- iOS 9.0–11.0Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- watchOS 2.0–4.0Deprecated
A quantity object containing the total energy burned during the specified time period.
A date object representing the activity’s start time.
A date object representing the activity’s end time.
A block that is called as soon as the calculations are complete. This block is passed the following parameters:
A quantity object containing the resting portion of the total energy.
A quantity object containing the active portion of the total energy.
An error object. If an error occurred, this object contains information about the error; otherwise, it is set to
This method operates asynchronously. As soon as the calculation is finished, it calls the completion block on a background queue.
This method splits the total calories into the active and resting calories, based on the user’s estimated resting metabolic rate and the activity’s duration. Use the resulting values to create samples representing both the active and resting energy burned.
Active energy samples contribute to Apple Watch’s activity monitoring.