Widget does not show any values
Opened this issue · 9 comments
Hi, thank you for this app. I cloned hte repository, built it and installed it on my phone. Everything seems to work, it says connected, the Widgets appear, but there are no values written in the widgets.
Any ideas? Maybe we can work it out together.
Thanks!
PS: The only change I did was to change to my team as developer, change the Bundle Identifier, and to change the app group name for app and widget. And I did change it in Configuration.swift.
PPS: I also set DEMO = false, now it is saying: connection failed, for both LibreView and Libre LinkUp.
Hi Phil, apparently the app was no longer compatible with the latest LLU API (4.7.0). I have adjusted this and at the same time solved an incompatibility with the latest widget API of iOS 17.
Can you pull the latest version and try it again?
Please also keep in mind that Apple iOS unfortunately does not provide any guarantees regarding the update interval of the glucose data. The documentation is sometimes quite nebulous.
Hi Stephan,
thanks for your swift reply! Great!
Btw, forgot to mention that I use Xcode 14.2 on macOS Monterey 12.6.7 and an iPhone 12 mini with iOS 16.7.
I pulled your changes but am getting two Build errors now:
LibreWidget/LibreGlucoseWidget/LibreGlucoseWidget.swift:11:20 Cannot find 'containerBackground' in scope
LibreWidget/LibreGlucoseWidget/LibreGlucoseWidget.swift:201:18 Value of type 'some WidgetConfiguration' has no member 'contentMarginsDisabled'.
LLU is LibreLinkUp? Is the API available on the internet?
Thanks and regards
Phil
Hi Phil,
you have two options. Either you update Xcode to version 15 to be able to build iOS 17 apps or you might try the following branch:
https://github.com/stephan-james/LibreWidget/tree/feature/xcode14_ios16
Best regards, Stephan
HI Stephan.
Thanks for your help! I am still out of luck. I went for the Xcode 14 iOS 16 option.
But still the app tells me "Connection failed", no matter if I enter my lib review account or a Librelinkup account.
There are, however, some debug messages, for example execution gets pausend by
Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d21fff8) Commons.swift:32
and some more
2023-10-30 23:30:24.503032+0100 LibreGlucoseWidgetExtension[1376:382755] [widget] No intent in snapshot(for:with:completion:)
2023-10-30 23:30:25.918774+0100 LibreGlucoseWidgetExtension[1376:382755] [User Defaults] Couldn't read values in CFPrefsPlistSource<0x149e09390> (Domain: group.de.poeml.philipp.LibreWidget, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd
I was reading that the latter one is some iOS bug, which is kind of "normal".
Any ideas?
Cheers
Philipp
I am out of luck. I got my hands on a MAC with Xcode 15 and I compiled the main branch. But it is still the same.
It looks like there is no data to display or so.
I am not sure how to debug this. Where to start?
Ok, so what we see on the image is the widget in "placeholder" mode. Why it is shown in placeholder mode we have to find out. Maybe it has something to do with the "app group" configuration....
The funny thing is: It works perfectly fine in the simulator. Just not on my phone.
So, it is working now. After fixing Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d21fff8) Commons.swift:32 by using
formatter.locale = Locale(identifier: "en_US_POSIX")
The app is running now and populating the widget with numbers.
I forked the project and started adding some things.
Do you mind if I make a TestFlight build? Maybe we can get some more people to help with the coding.
Thanks for developing and sharing this!