creepymonster / GlucoseDirect

App programmed in Swift/SwiftUI for using Libre blood glucose sensors.
MIT License
361 stars 115 forks source link

Apple Health Full Data Sync #498

Open bassrock opened 1 year ago

bassrock commented 1 year ago

Goal

I use a Dario, which logs glucose values in it's own app and then sync it to Apple Health. There are other scenarios, like Smart Insulin pens that do the same thing.

The goal here is to do a full Apple Health sync pulling in data from other apps syncing to Apple Health and showing them within Glucose Direct.

This will require some migration of the existing data Glucose Direct saves to Apple Health, because we need to delete and resync it to save off the Apple Health Sync ID to prevent duplicate data being sent to Apple Health and so we can reliably delete and update data as needed.

This will also register Glucose Direct to recieve background apple updates.

bassrock commented 1 year ago

@creepymonster Ok this one is ready for review! This will sync data back and forth from HealthKit maintaining identifiers.

So if you use another app to input/modify values, it will bring it into GlucoseDirect using Apple Health Background updates.

thetimetraveler commented 1 year ago

how come this hasn't been merged yet?

muchosun commented 1 year ago

Merge it))))))

stoopman commented 1 year ago

I would very much like to see this merged as well 😁