Instance Method

executeQuery:

Starts executing the provided query.

Declaration

- (void)executeQuery:(HKQuery *)query;

Parameters

query

Discussion

HealthKit executes queries asynchronously on a background queue. Most queries automatically stop after they have finished executing. However, long-running queries—such as observer queries and some statistics collection queries—continue to execute in the background. To stop long-running queries, call the stopQuery: method.

See Also

Querying HealthKit Data

- stopQuery:

Stops a long-running query.