One Logo Pool Ball
HealthKit · IOS API REFERENCE

HKWorkoutZoneConfiguration

struct · iOS 27.0+ · SDK 27.1

struct HKWorkoutZoneConfiguration

Members (4)

init · iOS 27.0+

init

TypeScript
static init(quantityType: HKQuantityType, zoneBoundaries: Array<HKQuantity>): HKWorkoutZoneConfiguration
Swift declaration
init(quantityType: HKQuantityType, zoneBoundaries: [HKQuantity]) throws

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.

get · iOS 27.0+

source

TypeScript
get source(): HKWorkoutZoneConfiguration_Source
Swift declaration
let source: HKWorkoutZoneConfiguration.Source

The source of the zone configuration.

Skipped declarations

No declarations were skipped in this snapshot.

All HealthKit types →