JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
327 stars 320 forks source link

Show BG as app icon on Watch #441

Closed SamJBentley closed 1 year ago

SamJBentley commented 1 year ago

I previously used Miao Miao's Tomato app, before switching to xDrip. What I loved about Tomato, was that I could see my BG just by looking at my watch, as the icon was my BG value. Really useful when driving, for example. Does this functionality exist in xDrip? If not, I'm happy to raise a PR

jonisaksson commented 1 year ago

If I understand what you are asking for, then yes that exists through the calendar compilation.

paulplant commented 1 year ago

It's unclear if you're talking about the complication, or about simply being able to see your BG without opening the Watch app.

It is possible to put the BG value in the calendar complication. We originally did this but removed it before release as the update was just too unreliable due to WatchOS complication refresh rules/policy. This same issue affects all other complications including Dexcom.

We could look at putting it back when the Watch app is next updated and see if people prefer it even if it cannot be 100% relied on to be current.

If you are simply looking for a reliable way to see your BG values at all times, then as @jonisaksson says, you can just use the calendar complication as per the manual (just scroll down a bit):

https://xdrip4ios.readthedocs.io/en/latest/configure/applewatch/#calendar-complication-method

SamJBentley commented 1 year ago

Sorry for the delay. Hmm, I couldn't get the calendar to work, maybe I'll try again. I just thought something more native and less of a "workaround" kinda feel would be better? Hapy to take a look myself, but I'm new to Apple, Swift & Watch development

paulplant commented 1 year ago

No worries... but again, I'm not sure what it is that you want to look at? Or even why it's raised as an issue? 😉

The calendar event isn't really a workaround. It's also a great way to share BG values via iCloud without using Nightscout if wanted. And it's pretty much the only way to get BG data into CarPlay.

And as mentioned, the native way of putting the BG value directly in a complication is not very reliable due to constraints in the way WatchOS allows complication refreshes.

SamJBentley commented 1 year ago

Ok, fair enough :-)

Didn't mean to raise it as an issue, sorry, meant it as a feature request. I just like the way that the Tomato app shows your BG when you look at your watch. Could probably get it on the CarPlay display too. If there's no appetite for this feature, or if it's too complicated, then no worries, feel free to close :-)

paulplant commented 1 year ago

hehehe... we're kind of going around in circles....

You can get it on CarPlay using the calendar event function. There is no way that Apple would grant CarPlay access for us to build a native app - it doesn't work like that. And you're talking about if it's too complicated, but I've already explained a few times that it we already know how to add it (it's very simple to do it) but it is unreliable for reasons outside of our control and that's why we removed it. I'll try adding it back it and testing it to see if the more recent versions of iOS/WatchOS make it more reliable.

SamJBentley commented 1 year ago

Ha, ok, I get it now, sorry bit slow this morning!

It would be super awesome if you could test it again. Thanks!