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:
- Is this a known issue with HKObserverQuery and enableBackgroundDelivery on watchOS 26?
- Are there any recommended workarounds or best practices to ensure continuous background delivery of health data?
Thank you in advance for your help.