One Logo Pool Ball
HealthKit · IOS API REFERENCE

HKStatisticsCollectionQuery

class · SDK 27.1

class HKStatisticsCollectionQuery

Members (8)

init

init

TypeScript
static init(quantityType: HKQuantityType, quantitySamplePredicate: (_Foundation_NSPredicate) | null, options: HKStatisticsOptions, anchorDate: globalThis.Date, intervalComponents: _Foundation_DateComponents): HKStatisticsCollectionQuery
Swift declaration
init(quantityType: HKQuantityType, quantitySamplePredicate: NSPredicate?, options: HKStatisticsOptions = [], anchorDate: Date, intervalComponents: DateComponents)
get

anchorDate

TypeScript
get anchorDate(): globalThis.Date
Swift declaration
var anchorDate: Date { get }
get

initialResultsHandler

TypeScript
get initialResultsHandler(): (((arg0: HKStatisticsCollectionQuery, arg1: (HKStatisticsCollection) | null, arg2: (NativeError) | null) => Promise<void>)) | null
Swift declaration
var initialResultsHandler: (@Sendable (HKStatisticsCollectionQuery, HKStatisticsCollection?, (any Error)?) -> Void)? { get set }
set

initialResultsHandler

TypeScript
set initialResultsHandler(value: (((arg0: HKStatisticsCollectionQuery, arg1: (HKStatisticsCollection) | null, arg2: (NativeError) | null) => void)) | null)
Swift declaration
var initialResultsHandler: (@Sendable (HKStatisticsCollectionQuery, HKStatisticsCollection?, (any Error)?) -> Void)? { get set }
get

intervalComponents

TypeScript
get intervalComponents(): _Foundation_DateComponents
Swift declaration
var intervalComponents: DateComponents { get }
get

options

TypeScript
get options(): HKStatisticsOptions
Swift declaration
var options: HKStatisticsOptions { get }
get

statisticsUpdateHandler

TypeScript
get statisticsUpdateHandler(): (((arg0: HKStatisticsCollectionQuery, arg1: (HKStatistics) | null, arg2: (HKStatisticsCollection) | null, arg3: (NativeError) | null) => Promise<void>)) | null
Swift declaration
var statisticsUpdateHandler: (@Sendable (HKStatisticsCollectionQuery, HKStatistics?, HKStatisticsCollection?, (any Error)?) -> Void)? { get set }
set

statisticsUpdateHandler

TypeScript
set statisticsUpdateHandler(value: (((arg0: HKStatisticsCollectionQuery, arg1: (HKStatistics) | null, arg2: (HKStatisticsCollection) | null, arg3: (NativeError) | null) => void)) | null)
Swift declaration
var statisticsUpdateHandler: (@Sendable (HKStatisticsCollectionQuery, HKStatistics?, HKStatisticsCollection?, (any Error)?) -> Void)? { get set }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

HKStatisticsCollectionQuery.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All HealthKit types →