HealthKitTypes

public struct HealthKitTypes

Allows to specify different types of data from HealthKit that wants to be read or written.

  • HealthKit characteristics, such as gender and date of birth, to be read from HealthKit.

    Declaration

    Swift

    public var characteristicTypesToRead = Set<HKCharacteristicType>()
  • HealthKit quantities to be read.

    Declaration

    Swift

    public var quantityTypesToRead = Set<HKQuantityType>()
  • HealthKit quantities to be written.

    Declaration

    Swift

    public var quantityTypesToWrite = Set<HKQuantityType>()
  • Designated initializer.

    Declaration

    Swift

    public init(readCharacteristics: Set<HKCharacteristicType>, readQuantities: Set<HKQuantityType>, writeQuantities: Set<HKQuantityType>)

    Parameters

    readCharacteristics

    characteristics, such as gender and date of birth, to be read from HealthKit

    readQuantities

    quantities to be read

    writeQuantities

    quantities to be written

  • Returns false if no type has been specified.

    Declaration

    Swift

    public var isEmpty: Bool