HealthKit · IOS API REFERENCE
HKQuantitySample
class · iOS 8.0+ · SDK 27.1
class HKQuantitySample
Members (6)
init · iOS 8.0+init
TypeScriptstatic initTypeQuantityStartEnd(quantityType: HKQuantityType, quantity: HKQuantity, startDate: globalThis.Date, endDate: globalThis.Date): HKQuantitySample
Swift declarationconvenience init(type quantityType: HKQuantityType, quantity: HKQuantity, start startDate: Date, end endDate: Date)
init · iOS 9.0+init
TypeScriptstatic initTypeQuantityStartEndDeviceMetadata(quantityType: HKQuantityType, quantity: HKQuantity, startDate: globalThis.Date, endDate: globalThis.Date, device?: (HKDevice) | null, metadata?: (Record<string, unknown>) | null): HKQuantitySample
Swift declarationconvenience init(type quantityType: HKQuantityType, quantity: HKQuantity, start startDate: Date, end endDate: Date, device: HKDevice?, metadata: [String : Any]?)
init · iOS 8.0+init
TypeScriptstatic initTypeQuantityStartEndMetadata(quantityType: HKQuantityType, quantity: HKQuantity, startDate: globalThis.Date, endDate: globalThis.Date, metadata?: (Record<string, unknown>) | null): HKQuantitySample
Swift declarationconvenience init(type quantityType: HKQuantityType, quantity: HKQuantity, start startDate: Date, end endDate: Date, metadata: [String : Any]?)
get · iOS 12.0+count
TypeScriptget count(): number
Swift declarationvar count: Int { get }
get · iOS 8.0+quantity
TypeScriptget quantity(): HKQuantity
Swift declaration@NSCopying var quantity: HKQuantity { get }
get · iOS 8.0+quantityType
TypeScriptget quantityType(): HKQuantityType
Swift declaration@NSCopying var quantityType: HKQuantityType { get }
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
HKQuantitySample.init()
inherited init: cannot prove legal (class declares 6 custom initializers)
All HealthKit types →