HealthKit needs a health check at WWDC

By

HealthKit on iCloud: Apple needs to step up its Health game.
Apple needs to step up its Health game.
Photo: Julia Ballew/Unsplash CC

As a fitness writer and app developer, there’s just one thing I’m hoping to see at WWDC next week: a major upgrade to HealthKit.

Don’t get me wrong. I think Apple’s health-tracking framework is great, but there’s so much more it could do. Moving HealthKit to iCloud would finally set Apple Watch free from its iPhone dependency, launch a brand-new Apple subscription service, enable users to access health and fitness data on all their devices, create a whole new class of TV fitness apps, and much, much more.

HealthKit does more than most people realize

According to Apple, HealthKit is just a technical term to be used by developers. But the phrase “works with HealthKit” is now used pretty much universally to describe third-party apps that integrate with the iPhone’s Health app.

As a result, most users don’t realize HealthKit does more than that. It’s also used by Apple Watch apps to log workouts. And that dependency is now the final major obstacle to Apple’s smartwatch becoming a truly stand-alone device.

Until Apple Watch is freed from this reliance on HealthKit, it will always be dependent on iPhone.

Why HealthKit is no longer fit for purpose

Freeing Apple Watch from its iPhone dependency is not the only reason HealthKit needs an update. There are three problems with the framework as it stands:

  1. It’s buggy: One of the biggest support problems I encounter with my gym app is that HealthKit randomly revokes access. And I’m not alone. This glitch affects many fitness apps. It’s one of the most serious HealthKit bugs, but there are plenty of others.
  2. It’s not designed for workouts: HealthKit was originally designed for logging samples from data sources such as a heart rate monitors and bathroom scales. As a result, it’s not ideal for logging workouts, where multiple samples should be stored together.
  3. It’s seriously slow: There’s always a lag when an app requests data from HealthKit. Even Apple’s own apps suffer from this. If you’ve ever wondered why it takes so long for the Activity app to display heart rate charts and workout maps, you can blame HealthKit.

Any upgrade to HealthKit should fix these problems. But there’s an even more fundamental issue to address. HealthKit only works on iPhone, which in today’s multiplatform environment massively limits its potential.

Why HealthKit should move to the cloud

Why HealthKit needs to move to iCloud: Apple needs to free HealthKit from the iPhone.
Apple needs to free HealthKit from the iPhone.
Diagram: Graham Bower/Cult of Mac

HealthKit stores all your health and fitness data in a database on your iPhone that is encrypted whenever your phone is locked. This means your data is only accessible when your phone is unlocked.

If you back up your iPhone to iCloud or your Mac*, your HealthKit database remains encrypted and unreadable.

That’s great for security, but it presents some pretty major limitations:

  • Your Apple Watch can only save workouts when it’s in range of your unlocked iPhone.
  • You can only view your workouts and health data on your iPhone.
  • Apple TV fitness apps can’t talk to your Apple Watch or the Activity app to log a workout.

By moving HealthKit from iPhone to iCloud, Apple could solve these problems and unlock previously untapped potential in its health and fitness offering.

A brand new service: Apple Health

In keeping with Apple’s new focus on services, moving HealthKit to iCloud presents the ideal opportunity to rebrand the service as Apple Health, (to sit alongside Apple Music, Apple TV, Apple News and Apple Arcade).

As a full-fledged iCloud service, Apple Health could boast some compelling features:

  • Three great apps: Health, Activity and an all-new stand-alone Workout app.
  • Available on all your devices: iPhone, Mac, iPad, Apple TV and iCloud.com.
  • Share workouts with friends and family.
  • Save workouts directly from Apple Watch to Apple Health via LTE and Wi-Fi.
  • Apple TV fitness apps integrate with Apple Watch and save your workouts to Apple Health.
  • Support for new workout types, including strength training.
  • No need for backups: Your health and fitness data is always stored securely on iCloud.

Every app on every platform

Catalyst is Apple’s framework that makes it easier for developers to port iOS apps to the Mac. Cupertino already used it to adapt other services such as Apple News, Apple Music and Apple TV.

But the Activity and Health apps have not yet been ported. You can’t even use them on your iPad. That’s because HealthKit data is currently only accessible on your iPhone.

The larger screen of a Mac or iPad would make it much easier to delve into your fitness stats and share workouts with friends and family. It would also provide a great opportunity for Apple to separate Workout and Activity data with an all-new stand-alone Workout app for more serious athletes. This could quickly become a Strava-killer.

If you want to get a feel for what a dedicated Workout app built on HealthKit might look like, check out HealthFit, an excellent third-party solution from indie developer Stéphane Lizeray.

A new breed of Apple TV fitness apps

Can't get to the gym? Let your Apple TV bring the gym to you.
HealthKit on iCloud would enable TV fitness apps to communicate with Apple Watch.
Photo: Graham Bower/Cult of Mac

Apple TV fitness apps are one of the few popular categories on the TV App Store. These apps enable you to work out in front of your TV, with Jane Fonda-style videos.

But right now, three major limitations hold back TV fitness apps:

  1. They can’t save your workouts to HealthKit.
  2. They can’t communicate with Apple Watch to access motion sensors, calories and heart rate data.
  3. They can’t send notifications to your wrist — like a gentle tap to let you know when to switch exercises.

By moving HealthKit to iCloud, Apple TV fitness apps could finally communicate directly with Apple Watch and the Activity app. That would mean they could display your heart rate and calories on the TV screen and save your workout when you finish.

One clue to where this might lead is the recent rumor that Apple is developing its own TV fitness app. This is the strongest evidence yet that HealthKit is moving to iCloud, because it’s hard to imagine Apple offering a TV fitness app that doesn’t work with Apple Watch.

Apple’s TV workout app could come as a part of a new Apple Health+ premium service, with new workouts from elite celebrity trainers added weekly.

Getting HealthKit in shape for your workout data

Moving HealthKit to the cloud unlocks plenty of exciting possibilities. But to fulfill its true potential, there’s one final missing piece of the puzzle.

HealthKit is not ideal for storing workout data because it is based exclusively on samples. HealthFit developer Lizeray argues that the time has come for Apple to extend HealthKit with “records” — a concept that already exists in the .FIT specification used by rivals such as Garmin.

In a workout, you need to associate multiple data types with a timestamp. For example, in a running workout, your pace is associated with a certain GPS location. But these samples are currently stored separately in HealthKit. Records would provide a way of storing them together.

This would be handy when you’re using equipment like an indoor exercise bike. You could log the workout with your Apple Watch in the usual way and, when you’re done, you could read off the key stats from the dashboard that Apple Watch doesn’t capture automatically. For example, you could say: “Hey Siri, that workout was 6.1 miles,” and this would be automatically appended to your workout record.

Records also could be used to support entirely new workout types. In a strength-training workout, there’s more data to log than just samples. Values like weight, repetitions and sets are also important.

To support this, Apple could include identifiers for popular exercises like push-ups and squats. This would mean users could track their progress on these exercises regardless of which app they used to log them.

Apple is a leader, but it can still raise its game

HealthKit already provides unrivaled freedom and flexibility to access your fitness data and export it to third-party services like Strava if you wish. Unlike many of its competitors, Apple doesn’t need to lock you into its fitness platform, because it’s the best on the market. Users stick with Apple Watch because they want to. Not because they have to.

But like any elite athlete, there’s always the potential for Cupertino to raise its game. I think moving HealthKit to iCloud is one such opportunity.

*NB: When you back up your iPhone to your Mac, HealthKit data is only stored if you do an encrypted backup.