Post

Replies

Boosts

Views

Activity

Reply to Background Health Store Access for Lock Screen Widgets
Hope it helped and got you (partially) what you’re looking for! I’m not sure you can always show and update the Health data whether the device is locked or not. As far as I know and understood the HealthKit database is locked when the device is locked. You could show a cached version of your latest data. That way you at least show something, unlocking the device will often update it. Still not a 100% what you’re looking for I guess, so if you do find a solution please let me know! :)
Jun ’24
Reply to Background Health Store Access for Lock Screen Widgets
I've asked Apple Support this question about 1,5 year ago and what you would need to do is: Add the "Data Protection" capability to the main app (so not the Widget extension) Add “com.apple.developer.default-data-protection” entitlement key with value “NSFileProtectionComplete” to the widget target. That way the widget will only request new timelines when the data is available (not protected) and you’ll no longer get errors. If a reload of data would be requested when the device is locked, it will be executed when the device unlocks. Just like Apple's activity rings Lock Screen Widget. Hope this helps and is what you're looking for!
Jun ’24