Created
February 4, 2018 08:02
-
-
Save gkye/f878bb409bf5acb6d1e6130d8bc067aa to your computer and use it in GitHub Desktop.
HKTypeIdentifiers for HealthKit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// HKTypeIdentifiers | |
// HealthKit | |
// | |
// Copyright (c) 2014 Apple Inc. All rights reserved. | |
// | |
/*--------------------------------*/ | |
/* HKQuantityType Identifiers */ | |
/*--------------------------------*/ | |
public struct HKQuantityTypeIdentifier : Hashable, Equatable, RawRepresentable { | |
public init(rawValue: String) | |
} | |
extension HKQuantityTypeIdentifier { | |
@available(iOS 8.0, *) | |
public static let bodyMassIndex: HKQuantityTypeIdentifier | |
@available(iOS 8.0, *) | |
public static let bodyFatPercentage: HKQuantityTypeIdentifier // Scalar(Percent, 0.0 - 1.0), Discrete | |
@available(iOS 8.0, *) | |
public static let height: HKQuantityTypeIdentifier // Length, Discrete | |
@available(iOS 8.0, *) | |
public static let bodyMass: HKQuantityTypeIdentifier // Mass, Discrete | |
@available(iOS 8.0, *) | |
public static let leanBodyMass: HKQuantityTypeIdentifier // Mass, Discrete | |
@available(iOS 11.0, *) | |
public static let waistCircumference: HKQuantityTypeIdentifier // Length, Discrete | |
// Fitness | |
@available(iOS 8.0, *) | |
public static let stepCount: HKQuantityTypeIdentifier // Scalar(Count), Cumulative | |
@available(iOS 8.0, *) | |
public static let distanceWalkingRunning: HKQuantityTypeIdentifier // Length, Cumulative | |
@available(iOS 8.0, *) | |
public static let distanceCycling: HKQuantityTypeIdentifier // Length, Cumulative | |
@available(iOS 10.0, *) | |
public static let distanceWheelchair: HKQuantityTypeIdentifier // Length, Cumulative | |
@available(iOS 8.0, *) | |
public static let basalEnergyBurned: HKQuantityTypeIdentifier // Energy, Cumulative | |
@available(iOS 8.0, *) | |
public static let activeEnergyBurned: HKQuantityTypeIdentifier // Energy, Cumulative | |
@available(iOS 8.0, *) | |
public static let flightsClimbed: HKQuantityTypeIdentifier // Scalar(Count), Cumulative | |
@available(iOS 8.0, *) | |
public static let nikeFuel: HKQuantityTypeIdentifier // Scalar(Count), Cumulative | |
@available(iOS 9.3, *) | |
public static let appleExerciseTime: HKQuantityTypeIdentifier // Time Cumulative | |
@available(iOS 10.0, *) | |
public static let pushCount: HKQuantityTypeIdentifier // Scalar(Count), Cumulative | |
@available(iOS 10.0, *) | |
public static let distanceSwimming: HKQuantityTypeIdentifier // Length, Cumulative | |
@available(iOS 10.0, *) | |
public static let swimmingStrokeCount: HKQuantityTypeIdentifier // Scalar(Count), Cumulative | |
@available(iOS 11.0, *) | |
public static let vo2Max: HKQuantityTypeIdentifier // ml/(kg*min) Discrete | |
@available(iOS 11.2, *) | |
public static let distanceDownhillSnowSports: HKQuantityTypeIdentifier // Length, Cumulative | |
// Vitals | |
@available(iOS 8.0, *) | |
public static let heartRate: HKQuantityTypeIdentifier // Scalar(Count)/Time, Discrete | |
@available(iOS 8.0, *) | |
public static let bodyTemperature: HKQuantityTypeIdentifier // Temperature, Discrete | |
@available(iOS 9.0, *) | |
public static let basalBodyTemperature: HKQuantityTypeIdentifier // Basal Body Temperature, Discrete | |
@available(iOS 8.0, *) | |
public static let bloodPressureSystolic: HKQuantityTypeIdentifier // Pressure, Discrete | |
@available(iOS 8.0, *) | |
public static let bloodPressureDiastolic: HKQuantityTypeIdentifier // Pressure, Discrete | |
@available(iOS 8.0, *) | |
public static let respiratoryRate: HKQuantityTypeIdentifier // Scalar(Count)/Time, Discrete | |
// Beats per minute estimate of a user's lowest heart rate while at rest | |
@available(iOS 11.0, *) | |
public static let restingHeartRate: HKQuantityTypeIdentifier // Scalar(Count)/Time, Discrete | |
// Average heartbeats per minute captured by an Apple Watch while a user is walking | |
@available(iOS 11.0, *) | |
public static let walkingHeartRateAverage: HKQuantityTypeIdentifier // Scalar(Count)/Time, Discrete | |
// The standard deviation of heart beat-to-beat intevals (Standard Deviation of Normal to Normal) | |
@available(iOS 11.0, *) | |
public static let heartRateVariabilitySDNN: HKQuantityTypeIdentifier // Time (ms), Discrete | |
// Results | |
@available(iOS 8.0, *) | |
public static let oxygenSaturation: HKQuantityTypeIdentifier // Scalar (Percent, 0.0 - 1.0, Discrete | |
@available(iOS 8.0, *) | |
public static let peripheralPerfusionIndex: HKQuantityTypeIdentifier // Scalar(Percent, 0.0 - 1.0), Discrete | |
@available(iOS 8.0, *) | |
public static let bloodGlucose: HKQuantityTypeIdentifier // Mass/Volume, Discrete | |
@available(iOS 8.0, *) | |
public static let numberOfTimesFallen: HKQuantityTypeIdentifier // Scalar(Count), Cumulative | |
@available(iOS 8.0, *) | |
public static let electrodermalActivity: HKQuantityTypeIdentifier // Conductance, Discrete | |
@available(iOS 8.0, *) | |
public static let inhalerUsage: HKQuantityTypeIdentifier // Scalar(Count), Cumulative | |
@available(iOS 11.0, *) | |
public static let insulinDelivery: HKQuantityTypeIdentifier // Pharmacology (IU) Cumulative | |
@available(iOS 8.0, *) | |
public static let bloodAlcoholContent: HKQuantityTypeIdentifier // Scalar(Percent, 0.0 - 1.0), Discrete | |
@available(iOS 8.0, *) | |
public static let forcedVitalCapacity: HKQuantityTypeIdentifier // Volume, Discrete | |
@available(iOS 8.0, *) | |
public static let forcedExpiratoryVolume1: HKQuantityTypeIdentifier // Volume, Discrete | |
@available(iOS 8.0, *) | |
public static let peakExpiratoryFlowRate: HKQuantityTypeIdentifier // Volume/Time, Discrete | |
// Nutrition | |
@available(iOS 8.0, *) | |
public static let dietaryFatTotal: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryFatPolyunsaturated: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryFatMonounsaturated: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryFatSaturated: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryCholesterol: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietarySodium: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryCarbohydrates: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryFiber: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietarySugar: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryEnergyConsumed: HKQuantityTypeIdentifier // Energy, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryProtein: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryVitaminA: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryVitaminB6: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryVitaminB12: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryVitaminC: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryVitaminD: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryVitaminE: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryVitaminK: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryCalcium: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryIron: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryThiamin: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryRiboflavin: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryNiacin: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryFolate: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryBiotin: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryPantothenicAcid: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryPhosphorus: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryIodine: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryMagnesium: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryZinc: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietarySelenium: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryCopper: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryManganese: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryChromium: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryMolybdenum: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryChloride: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryPotassium: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 8.0, *) | |
public static let dietaryCaffeine: HKQuantityTypeIdentifier // Mass, Cumulative | |
@available(iOS 9.0, *) | |
public static let dietaryWater: HKQuantityTypeIdentifier // Volume, Cumulative | |
@available(iOS 9.0, *) | |
public static let uvExposure: HKQuantityTypeIdentifier // Scalar (Count), Discrete | |
} | |
/*--------------------------------*/ | |
/* HKCategoryType Identifiers */ | |
/*--------------------------------*/ | |
public struct HKCategoryTypeIdentifier : Hashable, Equatable, RawRepresentable { | |
public init(rawValue: String) | |
} | |
extension HKCategoryTypeIdentifier { | |
@available(iOS 8.0, *) | |
public static let sleepAnalysis: HKCategoryTypeIdentifier | |
@available(iOS 9.0, *) | |
public static let appleStandHour: HKCategoryTypeIdentifier // HKCategoryValueAppleStandHour | |
@available(iOS 9.0, *) | |
public static let cervicalMucusQuality: HKCategoryTypeIdentifier // HKCategoryValueCervicalMucusQuality | |
@available(iOS 9.0, *) | |
public static let ovulationTestResult: HKCategoryTypeIdentifier // HKCategoryValueOvulationTestResult | |
@available(iOS 9.0, *) | |
public static let menstrualFlow: HKCategoryTypeIdentifier // HKCategoryValueMenstrualFlow | |
@available(iOS 9.0, *) | |
public static let intermenstrualBleeding: HKCategoryTypeIdentifier // (Spotting) HKCategoryValue | |
@available(iOS 9.0, *) | |
public static let sexualActivity: HKCategoryTypeIdentifier // HKCategoryValue | |
@available(iOS 10.0, *) | |
public static let mindfulSession: HKCategoryTypeIdentifier // HKCategoryValue | |
} | |
/*--------------------------------------*/ | |
/* HKCharacteristicType Identifiers */ | |
/*--------------------------------------*/ | |
public struct HKCharacteristicTypeIdentifier : Hashable, Equatable, RawRepresentable { | |
public init(rawValue: String) | |
} | |
extension HKCharacteristicTypeIdentifier { | |
@available(iOS 8.0, *) | |
public static let biologicalSex: HKCharacteristicTypeIdentifier | |
@available(iOS 8.0, *) | |
public static let bloodType: HKCharacteristicTypeIdentifier // HKBloodTypeObject | |
@available(iOS 8.0, *) | |
public static let dateOfBirth: HKCharacteristicTypeIdentifier // NSDateComponents | |
@available(iOS 9.0, *) | |
public static let fitzpatrickSkinType: HKCharacteristicTypeIdentifier // HKFitzpatrickSkinTypeObject | |
@available(iOS 10.0, *) | |
public static let wheelchairUse: HKCharacteristicTypeIdentifier // HKWheelchairUseObject | |
} | |
/*-----------------------------------*/ | |
/* HKCorrelationType Identifiers */ | |
/*-----------------------------------*/ | |
public struct HKCorrelationTypeIdentifier : Hashable, Equatable, RawRepresentable { | |
public init(rawValue: String) | |
} | |
extension HKCorrelationTypeIdentifier { | |
@available(iOS 8.0, *) | |
public static let bloodPressure: HKCorrelationTypeIdentifier | |
@available(iOS 8.0, *) | |
public static let food: HKCorrelationTypeIdentifier | |
} | |
/*--------------------------------*/ | |
/* HKDocumentType Identifiers */ | |
/*--------------------------------*/ | |
public struct HKDocumentTypeIdentifier : Hashable, Equatable, RawRepresentable { | |
public init(rawValue: String) | |
} | |
extension HKDocumentTypeIdentifier { | |
@available(iOS 10.0, *) | |
public static let CDA: HKDocumentTypeIdentifier | |
} | |
/*------------------------------*/ | |
/* HKWorkoutType Identifier */ | |
/*------------------------------*/ | |
@available(iOS 8.0, *) | |
public let HKWorkoutTypeIdentifier: String | |
/*--------------------------------*/ | |
/* HKSeriesSample Identifiers */ | |
/*--------------------------------*/ | |
@available(iOS 11.0, *) | |
public let HKWorkoutRouteTypeIdentifier: String |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment