zoneGroup(for:)
Returns the current zone group for the specified quantity type.
Declaration
func zoneGroup(for quantityType: HKQuantityType) -> HKWorkoutZoneGroup?Parameters
- quantityType:
The quantity type for which to retrieve zone information.
Return Value
The zone group with current time-in-zone data, or nil if no zone information is available.
Discussion
This method provides real-time zone duration calculations during an active workout. The durations update as the system processes new samples.