Contents

preferredWorkoutZoneConfiguration(for:)

Returns someone’s preferred zone configuration for the specified quantity type.

Declaration

func preferredWorkoutZoneConfiguration(for quantityType: HKQuantityType) async throws -> HKWorkoutZoneConfiguration?

Parameters

  • quantityType:

    The quantity type for which to retrieve the preferred zone configuration.

Mentioned in

Return Value

The preferred zone configuration, or nil if the person hasn’t configured zones for the quantity type.

Discussion

The system returns the person’s manually configured zones from Health Settings, or the system-generated zones if the person hasn’t set custom values. System-generated zones update periodically as the person’s health metrics change, while zones configured by the person remain constant until modified. Apps can use this method to display zone information that aligns with the person’s preferences across all workouts.

See Also

Accessing the preferred units