anchorDate
TypeScriptget anchorDate(): globalThis.DateSwift declarationvar anchorDate: DateThe anchor date for the resulting collection’s time intervals.
struct · iOS 15.4+ · SDK 27.1
struct HKStatisticsCollectionQueryDescriptorget anchorDate(): globalThis.DateSwift declarationvar anchorDate: DateThe anchor date for the resulting collection’s time intervals.
set anchorDate(value: globalThis.Date)Swift declarationvar anchorDate: DateThe anchor date for the resulting collection’s time intervals.
get intervalComponents(): _Foundation_DateComponentsSwift declarationvar intervalComponents: DateComponentsThe date components that define the time interval for each statistics object in the resulting collection.
set intervalComponents(value: _Foundation_DateComponents)Swift declarationvar intervalComponents: DateComponentsThe date components that define the time interval for each statistics object in the resulting collection.
result(healthStore: HKHealthStore): Promise<HKStatisticsCollection>Swift declarationfunc result(for healthStore: HKHealthStore) async throws -> HKStatisticsCollectionReturns the collection of statistics matching the receiver.
get options(): HKStatisticsOptionsSwift declarationvar options: HKStatisticsOptionsThe options indicating which types of statistics to compute.
set options(value: HKStatisticsOptions)Swift declarationvar options: HKStatisticsOptionsThe options indicating which types of statistics to compute.
results(healthStore: HKHealthStore): HKStatisticsCollectionQueryDescriptor_ResultsSwift declarationfunc results(for healthStore: HKHealthStore) -> HKStatisticsCollectionQueryDescriptor.ResultsReturns an `AsyncSequence` representing a stream of changes to the statistics collection matching the receiver. The first element will reflect the current state of the statistics collection. Subsequent elements will be yielded to reflect changes to the collection. When possible, the `updateStatistics` property will be populated to indicate the specific statistics that have changed.
static init(predicate: HKSamplePredicate<HKQuantitySample>, options: HKStatisticsOptions, anchorDate: globalThis.Date, intervalComponents: _Foundation_DateComponents): HKStatisticsCollectionQueryDescriptorSwift declarationinit(predicate: HKSamplePredicate<HKQuantitySample>, options: HKStatisticsOptions, anchorDate: Date, intervalComponents: DateComponents)get predicate(): HKSamplePredicate<HKQuantitySample>Swift declarationvar predicate: HKSamplePredicate<HKQuantitySample>The predicate matching the samples to compute statistics over.
set predicate(value: HKSamplePredicate<HKQuantitySample>)Swift declarationvar predicate: HKSamplePredicate<HKQuantitySample>The predicate matching the samples to compute statistics over.
No declarations were skipped in this snapshot.