Home / Insights / Mobile App Development

Mobile App Development

Building Health and Wellness iOS Apps with HealthKit: Permissions, Data Rules and Architecture

HealthKit lets an iOS app read and write steps, workouts, sleep, heart rate and many other health measures with the user’s consent. It also comes with strict rules on how that data may be used, stored and shared. Those rules shape the product, not just the code.

TopicsMobile App DevelopmentProduct Design and Discovery

Key takeaways

  • Users grant HealthKit read and write access per data type, and an app cannot tell when read access was denied; design for missing data, not errors.
  • HealthKit data may not be used for advertising or sold, and sharing with third parties requires express user permission.
  • The HealthKit store is encrypted when the device is locked, which limits background reads; plan sync around this.
  • Decide early whether health data leaves the device; if it does, your backend inherits significant privacy and compliance obligations.
  • A privacy policy is mandatory, and marketing text and UI must make the health purpose clear.

Health and wellness apps are a natural fit for iPhone and Apple Watch. A fitness coaching app can read workouts, a nutrition app can write dietary data, a rehabilitation programme can track daily activity, and a care app can let families share agreed measures with carers. HealthKit provides the shared store on the device that makes this possible.

But HealthKit is not just another data API. Apple sets specific rules about consent, purpose and sharing, and the store behaves differently from your own database. Teams that discover these rules late often have to redesign onboarding, analytics or their backend. This article covers what to plan before you build. For the broader regulatory picture in healthcare software, see our guide on building HIPAA-compliant AI, much of which applies to any system handling health data.

What HealthKit is, and what it is not

HealthKit is a framework and an on-device store. Data from the user’s iPhone, Apple Watch, connected devices and other apps is stored locally in the HealthKit store, and apps can read or write specific data types with permission.

HealthKit isHealthKit is not
An on-device store shared between apps the user authorisesA cloud database you can query from your server
Fine-grained, per-type consent controlled by the userAn all-or-nothing permission
A source of data for health and fitness purposesA data source for advertising or general analytics
Available on iPhone and Apple WatchAvailable on Android; cross-platform apps need a separate approach there

If your product also targets Android, you will need a separate integration with that platform’s health data services. Cross-platform frameworks can call both through native code, but the permission models and data types differ, so plan for platform-specific work.

Designing the permission experience

Apple’s documentation is explicit: users grant or deny read and write access separately for each data type, and to prevent information leaks an app is not told when read access is denied. From the app’s point of view, the data simply does not exist.

Implications for product design

  • Ask for what you need, when you need it. Request types in context, for example when the user turns on activity tracking, rather than a long list at first launch.
  • Explain before the system prompt. A short screen explaining why each data type helps the user improves understanding and trust.
  • Design for empty states. Because denied read access looks like “no data”, screens must handle absence gracefully and offer a way to review settings, without assuming the user refused.
  • Write usage descriptions carefully. The app must include purpose strings for reading and writing health data, or it will crash when requesting authorisation.
  • Respect write permissions. Only write data you are confident is accurate; Apple’s guidelines prohibit writing false or inaccurate data into HealthKit.

The data use rules that shape your business model

Apple’s HealthKit privacy guidance and App Review Guidelines set rules that affect product and commercial decisions:

  • Data gained through HealthKit may not be used for advertising or similar services. You can show ads in a HealthKit app, but not ads based on HealthKit data.
  • It may not be sold to advertising platforms, data brokers or information resellers.
  • It may not be disclosed to a third party without express user permission, and even then only to a third party that also provides a health or fitness service to the user. Sharing for medical research with consent is permitted.
  • Personal health information may not be stored in iCloud.
  • The app must clearly disclose how it uses HealthKit data and must have a privacy policy.
  • The health or fitness purpose must be clear in both marketing text and the user interface.

Review your analytics, crash reporting and marketing SDKs against these rules. An analytics event that includes a heart rate value, for example, may send health data to a third party without the required permission. Keep health values out of analytics payloads by design.

Architecture: on-device, synced or shared

The most important architectural decision is whether health data leaves the device.

PatternDescriptionTrade-offs
On-device onlyApp reads HealthKit, computes insights locally, stores nothing on serversSimplest privacy story; no cross-device history; limited coaching or clinician features
Selective syncOnly derived or summarised values (for example daily totals) are sent to your backendEnables history and coaching with less sensitive data; still needs strong backend controls
Full sync and sharingRaw samples sent to the backend and shared with clinicians or carers with consentRichest features; highest compliance burden; may fall under health privacy regulation depending on market and role

Background access and locked devices

HealthKit data is encrypted when the device is locked, so an app running in the background may not be able to read from the store, although it can still write. Design sync to run when data is accessible, use background delivery where appropriate, and make sync incremental so it can resume reliably.

Backend controls if data leaves the device

  • Encrypt in transit and at rest; restrict access by role; log every access to health records.
  • Choose hosting regions that match your users’ regulatory expectations.
  • Support consent withdrawal and deletion end to end, including backups and downstream systems.
  • Keep health data out of general-purpose logs, analytics and error reports.

Compliance beyond Apple’s rules

Apple’s rules are a minimum. Depending on your market and whether you act for a healthcare provider, health privacy laws may also apply, such as HIPAA in the United States, the GDPR’s special category rules in Europe, or the Australian Privacy Principles. If the app makes diagnostic or treatment claims, medical device regulation may become relevant. Take advice from a qualified specialist early; the answer affects hosting, contracts with vendors and documentation.

Apple’s guidelines also expect medical apps to remind users to consult a doctor before making medical decisions. If your app gives health guidance, plan that wording and its placement with clinical and legal reviewers.

Pre-build checklist for a HealthKit app

  1. List each HealthKit data type you will read and write, and the user benefit for each.
  2. Decide where health data lives: on device only, summarised on the server, or fully synced.
  3. Map every SDK in the app and confirm none receives HealthKit data without permission.
  4. Design onboarding, contextual permission requests and empty states.
  5. Draft the privacy policy and in-app disclosures alongside the design, not after.
  6. Plan the Android equivalent if the product is cross-platform.
  7. Define how users withdraw consent and delete their data.
  8. Plan testing on real devices and an Apple Watch if relevant, including locked-device and background scenarios.

Before submission, run the app through a store pre-submission review; our App Store rejection checklist covers the general requirements, and health apps receive particular scrutiny.

Frequently asked questions

Can we use HealthKit data to personalise in-app offers?

Not for advertising or similar services. Using HealthKit data to improve the health or fitness features the user signed up for is the intended purpose; using it to target ads or sell to third parties is prohibited.

Why does our app show no data even though the user has a watch?

The user may have denied read access for that type, and HealthKit deliberately does not tell the app. Show a helpful empty state with guidance on reviewing permissions in settings.

Can we store HealthKit data on our servers?

Apple’s rules allow it with appropriate disclosure and consent, but not in iCloud, and sharing with third parties is tightly restricted. Storing health data on servers also brings legal and security obligations, so decide deliberately whether you need raw data or only summaries.

Can a Flutter or React Native app use HealthKit?

Yes, through plugins or native code, but the same Apple rules apply, and Android needs its own health data integration with a different permission model.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. Apple Developer Documentation: HealthKit, Protecting user privacy — Supported per-type consent, hidden read denial, usage description requirements, locked-device encryption and HealthKit data use and sharing rules.
  2. Apple Developer: App Review Guidelines — Supported rules on health data use, accuracy of written data, no iCloud storage of personal health information and medical app reminders.

Planning a health or wellness app on iPhone and Apple Watch?

We can help you design the permission flow, data architecture and privacy approach before development starts.