Contents

zoneConfiguration(for:)

Returns the zone configuration for the specified quantity type.

Declaration

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

Parameters

  • quantityType:

    The quantity type for which to retrieve the configuration.

Return Value

This method returns a custom configuration set by setZoneConfiguration(_:for:), if it exists. Otherwise, this method returns the person’s preferred workout zone configuration from the health store.

Discussion

This method throws an error if the framework can’t retrieve a zone configuration for the given quantity type.

See Also

Configuring zone data