Introductions: HealthKit, ResearchKit and CareKit

Manish Pathak
4 min readJul 3, 2023

The three main frameworks Apple provide in this domain are the following;

HealthKit

HealthKit is definitely the foundational piece in this domain. Most use cases will require your application to only be integrated with HealthKit. HealthKit offers APIs that centre around providing and reading users’ health data. The API itself is built to provide a seamless user experience in terms of permission to read and share data as well as ensuring the secure storage of said data on the device.

Any data that is visible in the Apple Health app can be read in your application (provided the user gives your app permission) and most data can be shared by your application. This creates a great ecosystem around a user’s health and wellbeing as it encourages a single source of truth for the user’s information. This means any data shared with HealthKit from a fitness app could also (with the user’s permission) be accessed by their diet app. This allows for richer sources of information and doesn’t force the user into a monopoly. They can use the best tool for the job. It is also possible to read and share a user’s clinical records (such as allergies they may have or vaccinations they have received).

ResearchKit

ResearchKit was the first Apple-generated open-source framework, ResearchKit is all about what it says on the tin, creating apps that help gather information for research purposes.

ResearchKit is an open-source framework released by Apple that lets developers create medical research apps specifically designed to recruit patients and help them participate in medical research studies. This framework comes with all the elements you will need to create a clinical research app.

With the apps built using ResearchKit, participants from anywhere in the world can contribute to the research study.

The ResearchKit framework provides three modules:

  1. Consent — provides a basic mechanism to ask for the participant’s consent
  2. Survey — prompts users to answer a set of questions
  3. Active task — instructs the participant to perform a specific task (e.g. finger tapping) for research purpose

Creating visual consent flows is about getting the user’s permission to participate in your study. This has some nice modules for allowing a user to digitally sign, and to enforce that the user has scrolled to the bottom of your terms before enabling the button to accept.

Module for capturing a digital signature from a user

Getting the user to perform a dynamic task is about getting your user to do something and recording the results. Prepackaged in ResearchKit are lots of common tests in areas such as mobility, speech, hearing, hand dexterity and more. The framework also includes APIs to help you create your own tasks.

An example active task. This measures a users gait and balance by guiding the user through a series of steps with audio cues with the phone in their pocket.

Creating surveys is pretty much what it says on the tin. Some nice modules to allow you to create surveys to gather information from a user. Even if you aren’t building a health app but want to quickly flesh out a survey at low cost, it’s worth remembering this capability of ResearchKit.

An example survey created using components provided by ResearchKit

Many ResearchKit apps use HealthKit to help gather more information about their users. Some active tasks, for example, might ask a user to do a step test while it monitors your heart rate.

You can find more information on ResearchKit at the official website.

CareKit

Finally, CareKit is the newest addition to the team. It has recently been rewritten to make use of the new Combine framework. CareKit exists to help build applications to help provide better care at home. The framework provides modules to help you:

  • Deliver personalized care plans
  • Track daily progress
  • Generate trends over time

CareKit exists to help create apps that support personalized healthcare. Giving carers and doctors access to exactly what a patient is doing, and how it is affecting their vitals. An example of this could be tailoring a diabetic patient’s insulin dosage.

In practice, the framework provides a card based layout on a scrolling calendar view. Each day presents the patient’s daily care plan, including graphs to show progress over time. This can (a) come in-app, whereby any action a user takes is saved locally to show on the device later; or (b) it can be sent to a remote server, following a certain protocol created for CareKit, allowing remote tracking of the users wellbeing.

An example of a daily care plan created using CareKit. The plan includes secluded tasks to perform such as taking Doxylamine and performing Kegel exercises. It also displays a trend over time linking nausea and Doxylamine intake.

You can find more information on CareKit at the official website.

--

--