Creates a zone configuration from zone boundaries for the specified quantity type with the Source set to `app`.
- Parameter quantityType: The quantity type these zones apply to (e.g., heart rate or cycling power).
- Parameter zoneBoundaries: An array of quantities representing the upper boundaries of each zone, ordered from lowest to highest. The first zone will have no lower bound, and the last zone will have no upper bound.
- Returns: A zone configuration with `source` set to `.app`.
- Throws: An error if the zone boundaries are invalid or incompatible with the quantity type.
get · iOS 27.0+
quantityType
TypeScript
get quantityType(): HKQuantityType
Swift declaration
var quantityType: HKQuantityType { get }
The quantity type these zones apply to.
get · iOS 27.0+
zones
TypeScript
get zones(): Array<HKWorkoutZone>
Swift declaration
let zones: [HKWorkoutZone]
An array of workout zones, ordered from lowest to highest threshold.