Contents

HKObserverQuery

A long-running query that monitors the HealthKit store and updates your app when the HealthKit store saves or deletes a matching sample.

Declaration

class HKObserverQuery

Mentioned in

Overview

Observer queries set up a long-running task on a background queue. This task watches the HealthKit store, and alerts you when the store saves or removes matching data. Your app uses observer queries to respond to changes made by other apps and devices.

Observer queries are immutable: You set their properties when you first create them, and you can’t change them.

Topics

Creating Observer Queries

See Also

Long-running queries