My problem with HealthKit

This is, in a sense, a follow-up to my big “how I use HealthKit” post from… almost a month ago, now.1 One thing you might note is that I’m now referring to HealthKit and not just – there is a bit of a difference, though largely a semantic one as is basically just a GUI dropped on top of the HealthKit database. It’s more of an ‘Apple preferences’ thing – “HealthKit” is a developer term, while user-facing references should all be to “the Health app” or something similar. Ah, Brand Guidelines.
That said, I’ve got a problem with HealthKit. Namely, the complete and total lack of iCloud sync. This wasn’t really something I’d thought about until recently, when, following a six-hour stint in the Apple Store, the Genius Bar had me do a complete reset of my phone. Not a “restore from backup,” a full factory reset, install it as a new device. Which would’ve been fine, considering how very pervasive cloud computing is these days – all of my apps are easy enough to download through the App Store, and I can sync all of my music back from my laptop. Documents take a bit of time to load up, but they’re all in somebody’s cloud.2 Passwords are more annoying, if I can’t have them recover from the iCloud backup, but I know all my passwords, and Authy has a nice cloud-recovery feature that means wiping a device won’t lock you out of your accounts.3
And then I pulled up the Health app to verify that Workflow was writing data properly.4 And I was rather dismayed to find that all of the data was gone. That’s a year of water data – going back to when iOS first allowed water intake to be stored. Two years of footsteps and flights climbed. Just shy of two years of overall nutritional intake. Hundreds of Workouts. The one that was most annoying was the two months of Activity data from my Watch – I was working on a 30-day streak, and I’d almost made it to a perfect month! All those filled rings, gone. Heartbreaking.
But, for me, this is all really just an inconvenience. Sure, it sucks to lose that much data,5 but it’s not life-threatening or anything.
Except Apple had, a few days before I went to the Apple Store, announced CareKit. It’s a big turning point for Health, because now instead of just being a personal-use sort of thing, all that data that the iPhone and Apple Watch automatically collect, and anything people enter either manually or through third-party apps- all that data can be put to good use. Doctors can have apps that allow them to monitor their patients, and, in the primary use case CareKit gave, provide post-op care in an intelligent way.
Which means Apple suddenly has a huge problem. Because, in my experience, the solution to every iOS-related problem I’ve had has been “wipe the OS and install from scratch.” Which translates to “all of your data can be recovered – except the Health data, which is securely stored on only the phone and thus goes away. And suddenly you’re telling people “you can either fix this problem with your iPhone and potentially die because your phone can no longer figure out the proper post-op care regime, or you can just live with whatever’s wrong with your phone.”
Somehow I really doubt that’s the user experience Apple wants people to have.

Now, since I hate to be the sort of person who comes up with a problem without offering a solution, I’ll take a whack at how to fix this. It doesn’t seem too hard, right? Just throw the Health data into iCloud, and Bob’s your uncle, right?
Well, not quite that simple. At the scale of iOS and Apple, nothing is simple. There’s two big problems with just syncing to iCloud.
First, privacy: in the wake of the collapsed FBI suit against Apple, privacy is a Big Deal at Apple. iCloud isn’t nearly as secure as the iPhone itself – the default method for getting into an iPhone, with a warrant, is to get the phone to back up to iCloud, and then Apple downloads the backup and hands the data to law enforcement. And yes, that method would’ve gotten law enforcement into the HealthKit data store before, but I can’t shake the idea that Apple would want iCloud as a whole to be a lot more secure before they’d start advocating that people store something so personal as health data in their cloud.
The second big problem is usage patterns. For someone like me, putting Health data into iCloud is no problem at all – I’ve got an Apple Watch, an iPhone, and a MacBook. No potential conflicting data there.6 But what about people with multiple iPhones? If two phones pick up motion events at the same time, but have different datapoints for that time, which one is correct? Not an insurmountable problem, but a problem to be aware of, at least. The other big deal with usage patterns would be people like my grandparents – my grandma just recently got a new iPhone, and Grandpa got the old one as a hand-me-down.7 They’ve shared an email address since they first got one, something like fifteen years ago. And now they’re sharing an Apple ID, and thus an iCloud account. There’s no good way to deal with multiple people sharing an iCloud account if you’re trying to sync Health data, unless you just give up on the idea of syncing it and instead have a per-phone cloud-based data store, at which point you’re basically just doing regular backups.
It’s a bit of a knotty problem, I’ll admit. But Apple has the resources to fix it, and I’d argue that it’s something they absolutely need to do if they’re going to be as serious about health (and Health) as the launch of CareKit seems to indicate they want to be.

  1. Seems more recent than that; strange. 
  2. I store files in a heavily-boosted free Dropbox account, a paid OneDrive account, a couple of different FTP servers, a Creative Cloud account, and on a massive pile of external hard drives I keep in my dorm room, all run through a USB hub to a WD MyCloud NAS with ‘cloud access.’ Lots of clouds happening around here. 
  3. That, by the way, is why I switched from Google Authenticator to Authy – a GA update removed all accounts stored in the app, and I barely managed to recover all of the accounts I had TFA enabled on. It was a close shave, and I immediately ditched GA as my token-generator. 
  4. I use Workflow to quickly log the amount of water I’m drinking – two taps (“drank water”, “24 fl oz”) vs “open”, “open Water”, “tap ‘add’”, “type in a number”, “tap save.” 
  5. My HealthKit data store was in the 50 megabyte range, if I’m remembering properly. Considering how space-efficient SQLite is, especially with rigorously structured data like all the HealthKit data stores are, that is a lot
  6. Well, there is in terms of Apple Watch vs iPhone Motion Coprocessor, but all that is (rather clunkily) handled in the Bluetooth sync between the two devices, so it’s not really a problem. 
  7. His prior phone was a Motorola Razr, and text message from him (switching off at random between raw-ABC entry and T9) were always delightfully incomprehensible.