Used to define the identifiers that create quantity type objects.

SDKs

- iOS 10.0+
- Mac Catalyst 13.0+
- watchOS 3.0+

Framework

- Health
Kit

## Declaration

## Overview

To create an `HKQuantity`

instance, pass an `HKQuantity`

value to the `quantity`

method.

Structure# HKQuantityTypeIdentifier

Used to define the identifiers that create quantity type objects.

SDKs

- iOS 10.0+
- Mac Catalyst 13.0+
- watchOS 3.0+

Framework

- Health
Kit

To create an `HKQuantity`

instance, pass an `HKQuantity`

value to the `quantity`

method.

`static let height: HKQuantity`TypeIdentifier

A quantity sample type that measures the user’s height.

`static let body`Mass : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s weight.

`static let body`MassIndex : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s body mass index.

`static let lean`BodyMass : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s lean body mass.

`static let body`FatPercentage : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s body fat percentage.

`static let waist`Circumference : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s waist circumference.

`static let heart`Rate : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s heart rate.

`static let resting`HeartRate : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s resting heart rate.

`static let walking`HeartRateAverage : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s heart rate while walking.

`static let heart`RateVariabilitySDNN : HKQuantityTypeIdentifier

A quantity sample type that measures the standard deviation of heartbeat intervals.

`static let oxygen`Saturation : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s oxygen saturation.

`static let body`Temperature : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s body temperature.

`static let blood`PressureDiastolic : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s diastolic blood pressure.

`static let blood`PressureSystolic : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s systolic blood pressure.

`static let respiratory`Rate : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s respiratory rate.

`static let vo2Max: HKQuantity`TypeIdentifier

A quantity sample that measures the maximal oxygen consumption during incremental exercise.

`static let blood`AlcoholContent : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s blood alcohol content.

`static let blood`Glucose : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s blood glucose level.

`static let electrodermal`Activity : HKQuantityTypeIdentifier

A quantity sample type that measures electrodermal activity.

`static let forced`ExpiratoryVolume1 : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of air that can be forcibly exhaled from the lungs during the first second of a forced exhalation.

`static let forced`VitalCapacity : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of air that can be forcibly exhaled from the lungs after taking the deepest breath possible.

`static let inhaler`Usage : HKQuantityTypeIdentifier

A quantity sample type that measures the number of puffs the user takes from their inhaler.

`static let insulin`Delivery : HKQuantityTypeIdentifier

A quantity sample that measures the amount of insulin delivered.

`static let number`OfTimesFallen : HKQuantityTypeIdentifier

A quantity sample type that measures the number of times the user has fallen.

`static let peak`ExpiratoryFlowRate : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s maximum flow rate generated during a forceful exhalation.

`static let peripheral`PerfusionIndex : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s peripheral perfusion index.

`static let dietary`Biotin : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of biotin (vitamin B7) consumed.

`static let dietary`Caffeine : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of caffeine consumed.

`static let dietary`Calcium : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of calcium consumed.

`static let dietary`Carbohydrates : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of carbohydrates consumed.

`static let dietary`Chloride : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of chloride consumed.

`static let dietary`Cholesterol : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of cholesterol consumed.

`static let dietary`Chromium : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of chromium consumed.

`static let dietary`Copper : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of copper consumed.

`static let dietary`EnergyConsumed : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of energy consumed.

`static let dietary`FatMonounsaturated : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of monounsaturated fat consumed.

`static let dietary`FatPolyunsaturated : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of polyunsaturated fat consumed.

`static let dietary`FatSaturated : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of saturated fat consumed.

`static let dietary`FatTotal : HKQuantityTypeIdentifier

A quantity sample type that measures the total amount of fat consumed.

`static let dietary`Fiber : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of fiber consumed.

`static let dietary`Folate : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of folate (folic acid) consumed.

`static let dietary`Iodine : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of iodine consumed.

`static let dietary`Iron : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of iron consumed.

`static let dietary`Magnesium : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of magnesium consumed.

`static let dietary`Manganese : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of manganese consumed.

`static let dietary`Molybdenum : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of molybdenum consumed.

`static let dietary`Niacin : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of niacin (vitamin B3) consumed.

`static let dietary`PantothenicAcid : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of pantothenic acid (vitamin B5) consumed.

`static let dietary`Phosphorus : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of phosphorus consumed.

`static let dietary`Potassium : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of potassium consumed.

`static let dietary`Protein : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of protein consumed.

`static let dietary`Riboflavin : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of riboflavin (vitamin B2) consumed.

`static let dietary`Selenium : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of selenium consumed.

`static let dietary`Sodium : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of sodium consumed.

`static let dietary`Sugar : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of sugar consumed.

`static let dietary`Thiamin : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of thiamin (vitamin B1) consumed.

`static let dietary`VitaminA : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of vitamin A consumed.

`static let dietary`VitaminB12 : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of cyanocobalamin (vitamin B12) consumed.

`static let dietary`VitaminB6 : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of pyridoxine (vitamin B6) consumed.

`static let dietary`VitaminC : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of vitamin C consumed.

`static let dietary`VitaminD : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of vitamin D consumed.

`static let dietary`VitaminE : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of vitamin E consumed.

`static let dietary`VitaminK : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of vitamin K consumed.

`static let dietary`Water : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of water consumed.

`static let dietary`Zinc : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of zinc consumed.

`static let step`Count : HKQuantityTypeIdentifier

A quantity sample type that measures the number of steps the user has taken.

`static let distance`WalkingRunning : HKQuantityTypeIdentifier

A quantity sample type that measures the distance the user has moved by walking or running.

`static let distance`Cycling : HKQuantityTypeIdentifier

A quantity sample type that measures the distance the user has moved by cycling.

`static let push`Count : HKQuantityTypeIdentifier

A quantity sample type that measures the number of pushes that the user has performed while using a wheelchair.

`static let distance`Wheelchair : HKQuantityTypeIdentifier

A quantity sample type that measures the distance the user has moved using a wheelchair.

`static let swimming`StrokeCount : HKQuantityTypeIdentifier

A quantity sample type that measures the number of strokes performed while swimming.

`static let distance`Swimming : HKQuantityTypeIdentifier

A quantity sample type that measures the distance the user has moved while swimming.

`static let distance`DownhillSnowSports : HKQuantityTypeIdentifier

A quantity sample type that measures the distance the user has traveled while skiing or snowboarding.

`static let basal`EnergyBurned : HKQuantityTypeIdentifier

A quantity sample type that measures the resting energy burned by the user.

`static let active`EnergyBurned : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of active energy the user has burned.

`static let flights`Climbed : HKQuantityTypeIdentifier

A quantity sample type that measures the number flights of stairs that the user has climbed.

`static let nike`Fuel : HKQuantityTypeIdentifier

A quantity sample type that measures the number of NikeFuel points the user has earned.

`static let apple`ExerciseTime : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of time the user spent exercising.

`static let apple`StandTime : HKQuantityTypeIdentifier

A quantity sample type that measures the amount of time the user has spent standing.

`static let basal`BodyTemperature : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s basal body temperature.

`static let uv`Exposure : HKQuantityTypeIdentifier

A quantity sample type that measures the user’s exposure to UV radiation.

`init(raw`Value : String)

Returns a newly initialized quantity type identifier using the provided string.

`static let environmental`AudioExposure : HKQuantityTypeIdentifier

A quantity sample type that measures audio exposure to sounds in the environment.

`static let headphone`AudioExposure : HKQuantityTypeIdentifier

A quantity sample type that measures audio exposure from headphones.

`class func quantity`Type (forIdentifier : HKQuantityTypeIdentifier) -> HKQuantityType?

Returns the shared quantity type for the provided identifier.