HKObserverQuery stops delivering updates in background on watchOS 26

Hello,

I’m building a health-related app for both watchOS and iOS, which needs to monitor certain health data (e.g., heart rate, active energy).

Before updating to watchOS 26, the queries worked reliably without any issues. However, after adapting to watchOS 26, some users have reported that health data updates stop being delivered.

What I’ve observed:

  • HKObserverQuery with enableBackgroundDelivery is set up normally.
  • On WatchOS 26, the query sometimes stops delivering updates entirely after a certain point, and once an update is missed, it may stop delivering further updates completely.
  • Restarting the Apple Watch temporarily restores delivery, but the problem reoccurs after some time.

This makes background health data monitoring unreliable for my app.

Here’s a simplified version of the code we are using:

guard let heartType = HKObjectType.quantityType(forIdentifier: .heartRate) else { return }

let query = HKObserverQuery(sampleType: heartType, predicate: nil) { query, completionHandler, error in
    if let error = error {
        logEvent("Observer error: \(error.localizedDescription)")
        return
    }
    logEvent("Heart rate changed")
    MyNotificationManager.shared.sendNotification() // Send a local notification
    
    completionHandler()
}

healthStore.execute(query)

healthStore.enableBackgroundDelivery(for: heartType, frequency: .hourly) { success, error in
    if success {
        logEvent("Background heart rate delivery enabled")
    } else {
        logEvent("Failed to enable background heart rate delivery: \(error?.localizedDescription ?? "Unknown error")")
    }
}

Could you please clarify:

  1. Is this a known issue with HKObserverQuery and enableBackgroundDelivery on watchOS 26?
  2. Are there any recommended workarounds or best practices to ensure continuous background delivery of health data?

Thank you in advance for your help.

You must call the completion handler block in every case in your update handler.

In line 6, you handle the error without ever calling the completion handler block. Users who hit this error case will fail to tell the system that you are 'done'. This will eventually result in the system stop sending you background updates.

See the discuss here: https://developer.apple.com/documentation/healthkit/hkobserverquerycompletionhandler

Sorry, @HealthyPotter I missed part of the code earlier. In fact, the error scenario also has a callback.

        
        let query = HKObserverQuery(sampleType: heartType, predicate: nil) { query, completionHandler, error in
            if let error = error {
                logEvent("Observer 错误:\(error.localizedDescription)")
                completionHandler()
                return
            }
            logEvent("【心率有变化了")
            MyNotificationManager.shared.sendNotification() // 发了一个本地通知
            
            completionHandler()
        }
        
        healthStore.execute(query)
        
        healthStore.enableBackgroundDelivery(for: heartType, frequency: .hourly) { success, error in
            if success {
                logEvent("已启用后台心率监听")
            } else {
                logEvent("后台监听心率失败:\(error?.localizedDescription ?? "未知错误")")
            }
        }
        
】

Sorry, I missed part of the code. In fact, the error scenario also has a callback. I just sent a local notification and then immediately called completionHandler().

【guard let heartType = HKObjectType.quantityType(forIdentifier: .heartRate) else { return }
        
        let query = HKObserverQuery(sampleType: heartType, predicate: nil) { query, completionHandler, error in
            if let error = error {
                logEvent("Observer 错误:\(error.localizedDescription)")
                completionHandler()
                return
            }
            logEvent("【心率有变化了")
            MyNotificationManager.shared.sendNotification() // 发了一个本地通知
            
            completionHandler()
        }
        
        healthStore.execute(query)
        
        healthStore.enableBackgroundDelivery(for: heartType, frequency: .hourly) { success, error in
            if success {
                logEvent("已启用后台心率监听")
            } else {
                logEvent("后台监听心率失败:\(error?.localizedDescription ?? "未知错误")")
            }
        }
        
】

Yeah, this is a reported issue. I’d suggest that you file a feedback report and use the report to track the status of the issue.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

HKObserverQuery stops delivering updates in background on watchOS 26
 
 
Q