Just finished coding this and preliminary testing seems to be working fine to query data from Apple Health and then Sync to selected destinations (Currently only Intervals.icu as Garmin is still broken)
(I don’t really use Apple Health so I’ve been populating it with dummy data and testing the sync)
You can do Bulk Sync (Past Data) or auto-sync each time BreakAway sync with intervals.icu for “Week In Review”
Thank You very much,
I’ve already downloaded the beta version, and I’m almost ready to test the synchronization.
I’m just having trouble with the time available…
As soon as I have more time I’ll try to do everything and I’ll update you.
Good News. I’ve managed to track down a situation where users were getting 422 errors from the Sync. Essentially this error is happening due to A (or a few) fields that is chosen to be synced from Apple Health → Intervals.icu but is not present / chosen within intervals.icu list of wellness fields.
This will now show up as an alert indicating which field is missing.
Sleep is now added as another parameter that can be synced to intervals.icu
We will use the “actual” sleep time
>= iOS16 will be totalSleep = "inBed" - "awake" time
< iOS16 will be totalSleep = time asleep
Caveat, if you are a user that has multiple sleep apps all writing to Apple Health App, this may present a challenge as they may have overlapping data. If you find that the total sleep numbers is incorrect, please do contact me so I can see how to sort it out.
edit: based on the Apple docs and what other apps are doing, the moving forward recommendation is to pick one app which would be your default app and have that write the sleep data to Apple Health, remove the rest. This is because Apple currently does not provide the “source priority” hence we can’t filter it).
hi. thanks and sorry… I think. I’ve all but completely abandoned this idea for android…
I went the Native Code part in the beginning rather than using a cross platform language. In hindsight, maybe that wasn’t the best idea to start with. Having said that, this made sure that my iPad Mini 2013 still runs smooth w/ it tho. (yeah, I’m using my 10yr old device as my main development device.)
Since this post, it looks like @david has done some magic up in Intervals.icu’s end. If the Field is Legit (meaning, it’s a valid field within Intervals.icu eg: "Steps vs “Ssteps”), even tho it’s not a pre-selected field by the user, intervals.icu will still accept the updated value. It will just not be shown/show up in Intervals.icu calendar / Wellness update prompt)
Can you please check how many sources of data (show all data and sources) you have in Apple Health? Example here, I have 2 (i only downloaded Sleepzy for testing. I’m not using it daily. Daily it’s Garmin)
Thanks for your response!
The problem is, just like you mentioned, I have two data sources. My iPhone will log the time in bed automatically, and it seems like IOS will ignore the extra data but the intervals.icu not.
Thank you!
it’s not that intervals.icu will ignore. it’s actually what Apple Health provides and unfortunately, Apple doesn’t provide a way to filter out the data prior to sending it. (for Sleep it doesn’t but for other things like step it will)
Are you using any other app (like sleepzy) or an Apple Watch or the data is coming from your iPhone itself?
I just experimented and I found that as soon as I enabled Apple “Sleep schedules” then I would have the iPhone as one of the sleep data sources.
my personal opinion, after reading about how the iPhone collects sleep data, I think I will turn it off. It just tracks when I dont’ touch/pickup the phone as when I am asleep.