One Logo Pool Ball
HealthKit · IOS API REFERENCE

HKStatisticsQueryDescriptor

struct · iOS 15.4+ · SDK 27.1

struct HKStatisticsQueryDescriptor

Members (6)

method · iOS 15.4+

result

TypeScript
result(healthStore: HKHealthStore): Promise<(HKStatistics) | null>
Swift declaration
func result(for healthStore: HKHealthStore) async throws -> HKStatistics?

Returns the statistics computed over the samples matching the receiver, or `nil` if no samples matched.

get · iOS 15.4+

options

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

The options indicating which types of statistics to compute.

set · iOS 15.4+

options

TypeScript
set options(value: HKStatisticsOptions)
Swift declaration
var options: HKStatisticsOptions

The options indicating which types of statistics to compute.

init · iOS 15.4+

init

TypeScript
static init(predicate: HKSamplePredicate<HKQuantitySample>, options: HKStatisticsOptions): HKStatisticsQueryDescriptor
Swift declaration
init(predicate: HKSamplePredicate<HKQuantitySample>, options: HKStatisticsOptions)
get · iOS 15.4+

predicate

TypeScript
get predicate(): HKSamplePredicate<HKQuantitySample>
Swift declaration
var predicate: HKSamplePredicate<HKQuantitySample>

The predicate matching the samples to compute statistics over.

set · iOS 15.4+

predicate

TypeScript
set predicate(value: HKSamplePredicate<HKQuantitySample>)
Swift declaration
var predicate: HKSamplePredicate<HKQuantitySample>

The predicate matching the samples to compute statistics over.

Skipped declarations

No declarations were skipped in this snapshot.

All HealthKit types →