Post

Replies

Boosts

Views

Activity

Reply to Combine not working in background tasks on watchOS 26
Well I tried both styles. The initial code was the swiftui .backgroundTask modifier which worked in iOS 18. I created a core data based logger to see where the hiccup was. I noticed data was indeed being read by the anchored queries from HealthKit. That data was then sent to a couple of published properties in observable objects which served as the start of the combine pipelines. In ios18 that led to updates that were critical for updating widgets. In iOS 26, the combine pipelines were not activated. So I switched back to the previous method of background tasks, ie wkapplication.scheduleBackgroundRefresh(...) That also did not allow any combine pipelines to happen. In the end, I had to rip out combine from the watch and use didSet and custom handler blocks. While that did work, obviously it's not as full featured (ie, you can't debounce). After using blocks, things went back to functioning properly. Thoughts?
Oct ’25
Reply to Unable to read HealthKit data on watchos26 while app is in the background
I resolved this issue, either via a restart or a re-install. I am now looking at combine pipelines in the background.
Replies
Boosts
Views
Activity
Oct ’25
Reply to Has Background Refresh Stopped Working on watchOS 26?
I actually moved back to the older handle () function on the app delegate as the .backgroundTask (swiftui) modifier didn't seem to be called at all. That said I'm dealing with a lack of combine pipeline in background tasks.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to Combine not working in background tasks on watchOS 26
Well I tried both styles. The initial code was the swiftui .backgroundTask modifier which worked in iOS 18. I created a core data based logger to see where the hiccup was. I noticed data was indeed being read by the anchored queries from HealthKit. That data was then sent to a couple of published properties in observable objects which served as the start of the combine pipelines. In ios18 that led to updates that were critical for updating widgets. In iOS 26, the combine pipelines were not activated. So I switched back to the previous method of background tasks, ie wkapplication.scheduleBackgroundRefresh(...) That also did not allow any combine pipelines to happen. In the end, I had to rip out combine from the watch and use didSet and custom handler blocks. While that did work, obviously it's not as full featured (ie, you can't debounce). After using blocks, things went back to functioning properly. Thoughts?
Replies
Boosts
Views
Activity
Oct ’25