Guides

iOS - Apple Health Guidelines

The Sahha SDK collects health data from Apple Health.

Follow these guidelines to ensure your app is approved by Apple.

Using HealthKit

Overview

Apple Health provides a central repository for health and fitness data on iPhone and Apple Watch. With the user’s permission, apps communicate with Apple Health to access and share this data. Use the enableSensors method of the Sahha SDK to show a user permission dialog for your app.

Read the official HealthKit Documentation for more information.

User Privacy

Because health data may contain sensitive, personal information, apps must receive permission from the user to read data from or write data to the HealthKit store. They must also take steps to protect that data at all times. For more information, see Protecting user privacy .


30-day read restriction

Applications can read data from Apple Health for up to 30 days prior to when any permission was first granted.

However, if a user deletes your app, the permission history is lost. If the user reinstalls your app and grants permission again, your app can read data from Apple Health up to 30 days prior to that new date.

Example

If a user first granted read permission to your application on March 30, 2023, the earliest data your app could read back would be from February 28, 2023 onwards.

The user then deletes your app on May 10, 2023. The user decides to reinstall it on May 15, 2023 and grant read permission. The earliest date your app can now read data from is April 15, 2023.


Locked restriction

Reading data with Apple Health is restricted while the device is locked. This restriction is in place to further strengthen user privacy. This assures users that Apple Health does not have read access to user data while the device is locked. As soon as the user unlocks the device, Apple Health can sync data that was recorded while the device was locked.


Requesting user permission

Any time your app requests user permissions, the system displays a form with all the requested data types shown. The user can toggle individual read and share permissions on and off. To learn how to provide a great user experience when asking for permissions, see Human Interface Guidelines > HealthKit .

Using HealthKit

What if a user rejects your app's permission?

Users have full control over which health data they would like to share and which apps to share it with. Your users may choose not to share specific health data with you for a number of personal reasons. If a user perviously denied your app permission but would like to enable permission, you must guide them to the correct screen to do so.

There are two ways the user can re-enable Apple Health permission for your app:


System app

Guide your users to reenable Apple Health permissions inside the Systems app.

  1. Open the "Systems" app from the Home screen Using HealthKit
  2. Tap on "Health" inside the Systems screen Using HealthKit
  3. Tap “Data Access & Devices” Using HealthKit
  4. Search or scroll to the name of your app Using HealthKit
  5. Choose which data types to enable / disable for your app Using HealthKit

Health app

Guide your users to reenable Apple Health permissions inside the Health app.

  1. Open the "Health" app from the Home screen Using HealthKit
  2. Switch to the “Sharing” tab, scroll down, and tap on “Apps and Services” Using HealthKit
  3. Search or scroll to the name of your app Using HealthKit
  4. Choose which data types to enable / disable for your app Using HealthKit