Data Integration
iOS - Apple Health Guidelines
The Sahha SDK collects health data from Apple Health.
Follow these guidelines to ensure your app is approved by Apple.
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. Importantly, also provide resources to the user on how the Sahha Scores work to comply with guidelines of medical apps.
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 .
Include Scienfitic Citations for Users
Sahha scores, biomarkers, and insights are grounded in scientific research. To comply with medical app guidelines, apps must provide users with accessible citations and sources for the health scores presented. We recommend displaying the following links within your app for transparency and compliance:
- Activity Score : How the Activity Score Works - App Submission
- Sleep Score : How the Sleep Score Works - App Submission
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 .
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.
- Open the "Systems" app from the Home screen
- Tap on "Health" inside the Systems screen
- Tap “Data Access & Devices”
- Search or scroll to the name of your app
- Choose which data types to enable / disable for your app
Health app
Guide your users to reenable Apple Health permissions inside the Health app.
- Open the "Health" app from the Home screen
- Switch to the “Sharing” tab, scroll down, and tap on “Apps and Services”
- Search or scroll to the name of your app
- Choose which data types to enable / disable for your app