---
title: "init(quantityType:zoneBoundaries:)"
framework: healthkit
role: symbol
role_heading: Initializer
path: "healthkit/hkworkoutzoneconfiguration/init(quantitytype:zoneboundaries:)"
---

# init(quantityType:zoneBoundaries:)

Initializes a zone configuration from zone boundaries for the specified quantity type.

## Declaration

```swift
init(quantityType: HKQuantityType, zoneBoundaries: [HKQuantity]) throws
```

## Parameters

- `quantityType`: The quantity type to which these zones apply.
- `zoneBoundaries`: An array of quantities that represent the upper boundaries of each zone, ordered from lowest to highest. The first zone has no lower bound, and the last zone has no upper bound.

## Return Value

Return Value A zone configuration with source set to .app.

## Discussion

Discussion The system creates the individual zones based on the boundaries you provide. This method ensures that zones are contiguous and nonoverlapping. Call this method before calling setCustomZoneConfiguration(_:for:) to apply custom zones to a workout.
