Conversation

Fahim Farook

I’ve posted before about using fitness trackers and how we’d settled on AmazFit since it was cheap and seemed to work well … Unfortunately, after a few days of use it became evident that it wasn’t doing a great job at sleep tracking 😛

It was fine for the price point but it wasn’t totally accurate. I watched some YouTube videos by the Quantified Scientist (https://www.youtube.com/@TheQuantifiedScientist) and finally settled on the Fitbit Charge 5 as being accurate enough and yet cheap enough for my needs 🙂

I generally steer away from FitBit because it doesn’t sync any data with Apple Health and that was a big no-no for me.

But needs must and so got a Fitbit Charge 5 and then began looking around for solutions to the Apple Health data syncing. There were apps around but all the ones I found were subscription based. I didn’t want to pay a subscription to synch my data and so I took a look at the FitBit API, searched for any open source solutions on GitHub and when I didn’t find anything recent/working, I decided to code my own …

It’s been a bit of an adventure, I can tell you that 🙂 I’d worked with HealthKit before but I’d forgotten most of it and so had to do a bit of reading of the docs but once I got going, it was easy enough.

It took me about a day to get sleep data to sync properly to my satisfaction. If anybody wants to talk about (and complain about 😛) syncing (and updating) Apple HealthKit data, I’m your guy for the next week or so — then I’ll probably forget most of this again.

Initially, I thought I only wanted to sync sleep and maybe my step count for the day. But once I got going, I realized that there was a lot more I wanted — heart rate, resting heart rate (which is different), and SpO2/blood oxygen levels .. I’ve got it all now.

But I’m still not done 😛 Now I want respiratory rate and skin temperature too. I guess once you get started, you just can’t stop?

The app doesn’t have much of a UI at the moment since it simply connects to the FitBit API, gets the data and syncs with Apple Health. All the UI does is show logs of the actions going on. So no point in posting a screenshot …

I’m thinking of releasing the source as an open source project so that others can compile the app for themselves too instead of having to pay subscription fees. But that requires documentation since my app is set up only to fetch personal data and so others who want to compile and run for themselves will have to know a few things about configuring the project. So maybe in a few weeks once I get everything working just right?

#Swift #Apple #HealthKit #iOS #HealthTracking
0
2
2