HanSolo / Gluco-Tracker

A little Swift app to visualize glucose data from a nightscout server
3 stars 1 forks source link

Widget does not update until clicked #13

Open Winell opened 2 years ago

Winell commented 2 years ago

On my iPhone 13 pro and my wife’s iPhone 13 the widget does not automatically update the value until pressed. Application has access enabled to run in the background in IOS settings.

HanSolo commented 2 years ago

Yep that problem is related to the fact that on iOS, the operating systems decides when to update the widget. So usually it will only get updated once every 20 min. There is a way around that but that would involve an external server that can send push notifications to update widgets but that is out of my possibilities at the moment. So unfortunately updating the widget is not under my control but I will again look into it because I also would like to have that.

Winell commented 2 years ago

Thank you. I read in the closed issues that the refresh rate is triggered by an algorithm in IOS. Any way for the end user to have it trigger more often, ie interact with the widget more or less often?

HanSolo commented 2 years ago

Yep you can get up to 1 update every 5 minutes as far as I know and that will be calculated by the operating system on how often you use the widget. To be honest I did not saw a big decrease in update times when I've tried to use it more often but who knows what Apples AI is doing there.