Apple Health

What is Apple Health?

Apple Health is an iOS application introduced by Apple in iOS 8. It acts as a central health dashboard for iPhone users allowing them to view health data from numerous health apps in one place. More info on Apple Health can be found here.

Apple Watch data is also accessible via the connection to Apple Health.

Connecting Apple Health to Human API

Sharing data from Apple Health to Human API is a bit different than with most sources. This is because Apple Health data is stored solely on the user's iPhone. To share this data with Human API, we have created a Human API iOS app that users will use in conjunction with Human Connect.

Human Connect

When you enable Apple Health for your application, Apple Health and Apple Watch will be added to the list of sources in Connect.

When a user selects either of these, they will be shown the Human API login page where they will be prompted to install the Human API app.

Human API iOS App

After creating Human API credentials, your users will be directed to download the Human API iOS app from the App Store.

Once downloaded, there are three steps users must take before data is available:

  1. Sign in with the Human API credentials (created using the Human API app)
  2. Grant the Human API app access to each type of data stored in Apple Health as desired
    (this is the data that in turn will be accessible to you via Human API)
  3. Let the app synchronize Apple Health data with the Human API server

How Often Does Apple Health Data Sync?

Unlike most sources where data resides in the cloud, Human API cannot directly pull updated data at will. Instead, the Human API app must be installed and allowed to pull data from the device. Users can leave the app active in the background and syncs will continue.

For more information about sync behavior with Apple Health, see the following:

  • if the user force quits the Human API app or restarts their iPhone, background delivery will continue
  • if the phone is locked, AH health data is also locked--meaning there will be no updates (e.g. a user doesn’t unlock their phone for 2 days — there will be no updates for 2 days)
  • background delivery occurs at most once per hour. If the user wishes to perform an immediate sync, they simply need to open the Human API app
  • testing data delivery on an iPhone simulator does not work

📘

More reliable syncs

In the Human API iPhone app versions prior to v2.0, it was required to open the Human API app every time the user wanted to sync their data. After v2.0 was released, the app simply needs to be active in the background in order to regularly sync. This should help reduce friction when using the Apple Health integration.

Handling Data From Apple Health

All Healthkit data (e.g. from activity summaries) will come through under the source value 5541a9678e7192cb4fb34fed, which represents the source Id for Healthkit at Human API.