Glossary

What is HealthKit?

HealthKit is Apple's framework for Apple Health data: steps, workouts, heart rate, sleep, water and much more, kept in one store on the iPhone. With the person's permission, an app can read some of that data and save its own to it, and other apps can then use what it saved. The person decides, type by type, what each app may read and what it may write.

More about HealthKit

Permission comes per type and in both directions: an app that reads steps and saves water asks for exactly those two. For privacy, an app is never told whether someone refused it reading; a refused read simply comes back without the person's data, so a good app shows a gentle line rather than a zero. The app explains why it wants Health in two separate messages, one for reading and one for saving, and Apple's App Review Guidelines forbid using health data for advertising or writing false data into Health.

An example

A water and steps app shows how it fits together. The person taps Connect to Health, picks the two types on Apple's own permission sheet, and the app's first screen shows today's steps from Health beside a large button that logs a glass of water. Each glass is saved to Health as well, so it also appears in the Health app and in any other app the person allows to read water.

A common misunderstanding

HealthKit doesn't hand an app someone's whole medical history. The app sees only the types it asked for and was allowed, and a person can limit it to recent data instead of everything they have. Nor is it a cloud feed of your health that apps tap into: the data sits in the Health store on the device, and an app that wants it elsewhere has to send it there itself.

In a Borel app

Health is built in the preview and tried on a phone: the iPhone in your browser has no Health data, so a Borel app's Health parts show a plain line there where their numbers would be, and everything around them works. On a real iPhone, the app asks for the types it uses the first time you tap to connect. Apple's capabilities table lists HealthKit among what a free Apple Account can use, and if a copy of the app can't reach Health, it says so in place of those parts and keeps working. When you publish, both of its Health messages are already written.

HealthKit with Borel

Ask for an app that reads or saves Apple Health data, such as today's steps or glasses of water, and Borel builds it in Swift with HealthKit, asking only for the types the feature uses. On Pro, Borel Companion puts the app on your iPhone, where your Health data is.

Sources: Apple Developer: HealthKit; Apple Developer: Authorizing access to health data; Apple Developer: App Review Guidelines; Apple Developer: Supported capabilities (iOS). Checked .

Related terms

All glossary terms

Make your iPhone app in Borel

Describe it in your own words. Borel writes it in Swift, builds it on its own Mac and puts it on your iPhone.