Helpful
Helpful

Reputation: 706

API to push data to HealthKit

My ultimate goal: I want to automatically log my weight to healthkit on my phone every time I step on the scale.

Secondary goal: I don't want to spend much money, but I do want to learn. I'm a computer engineer and enjoy building hardware, but I don't just want to buy an off-the-shelf smart scale and install their app. Part of this comes down to data security: I don't like my information (especially health information) being in somebody else's hands.

Tertiary goal: I don't want to need an apple developer account (e.g., to roll my own on-phone app or something) but if I have to compromise here I will.

I want this to be as painless a process as possible - I've seen solutions that involve setting up a shortcut to ask for your current weight, etc, and I don't love that: less user interaction is better.

I'm usually wearing my apple watch when I weight myself, but might forget my phone (it's often right after a workout before I shower), if that helps.

I've seen a lot of questions on here talking about querying data, and I don't care about that: I'll use the phone to look at historical data, but I want to enter it automatically/painlessly so I have some data to look at.

For instance: I could set up an NFC sticker to open a shortcut, and maybe the process of scanning the sticker holds my phone in a specific place to read a QR code output by the scale? I honestly don't know if scanning a QR is possible in a shortcut, but this is just an example. The downside here is that I would need my phone on me.

The most promising solution from what I can tell is to build my scale to send the weight to google fit's API, and then install the google fit app on my phone to sync automatically. The downside is exposing my info to another service (google fit) rather than just keeping it in HealthKit, which I'd prefer.

Is there an auto-magic URL format that could trigger an iOS behavior to enter the data?

Is there an API through iCloud to just submit the data and not query it?

Is there a bluetooth option to talk to my watch and sync data there?

I see a lot of questions for querying/reading HealthKit data, but very little on submitting/saving it - so I'm not sure what's possible.

Suggestions appreciated!

Upvotes: 0

Views: 380

Answers (0)

Related Questions