---
title: "preferredWorkoutZoneConfiguration(for:)"
framework: healthkit
role: symbol
role_heading: Instance Method
path: "healthkit/hkhealthstore/preferredworkoutzoneconfiguration(for:)"
---

# preferredWorkoutZoneConfiguration(for:)

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

## Declaration

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

## Parameters

- `quantityType`: The quantity type for which to retrieve the preferred zone configuration.

## Mentioned in

Accessing workout zone data

## Return Value

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

## Discussion

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. note: An error if the zone configuration can’t be retrieved.

## See Also

### Accessing the preferred units

- [preferredUnits(for:completion:)](healthkit/hkhealthstore/preferredunits(for:completion:).md)
- [HKUserPreferencesDidChange](foundation/nsnotification/name-swift.struct/hkuserpreferencesdidchange.md)
