Skip to content
CARP Docs
Ask AISystemLightDark
On this page

iOS

Enable HealthKit and add the Info.plist usage descriptions for the health plugin on iOS.

Copy MarkdownOpen inOpen in GitHubView as MarkdownOpen in Scira AIOpen in ChatGPTOpen in ClaudeOpen in Cursor

On iOS, the plugin uses Apple HealthKit. It requires iOS 13.0 or higher.

  1. Enable the HealthKit capability

    In your Xcode project, open Targets → Runner → Signing & Capabilities and add HealthKit.

  2. Add usage descriptions to Info.plist

    Add both keys, each with the user-facing rationale for your app:

    ios/Runner/Info.plist
    <!-- ios/Runner/Info.plist -->
    <key>NSHealthShareUsageDescription</key>
    <string>We will sync your data with the Apple Health app to give you better insights</string>
    <key>NSHealthUpdateUsageDescription</key>
    <string>We will sync your data with the Apple Health app to give you better insights</string>

Permissions

On iOS, certain types support READ only, such as ECG events. The plugin throws if you request WRITE for these types.

  • Types that cannot be written include ELECTROCARDIOGRAM, the heart-rate event types (high, low and irregular), WALKING_HEART_RATE and ATRIAL_FIBRILLATION_BURDEN.
  • When you write data, recordingMethod must be manual or automatic.

See Permissions for the iOS permission model.

iOS-only write types

TypeConstraint
AudiogramCan be written on iOS only.
Insulin deliveryCan be written on iOS only. Requires a valid reason: basal or bolus.

See Writing data for examples.

Quick links

Page · DocumentationCARP DocumentationPage · DocumentationIntroductionPage · DocumentationQuickstartPage · DocumentationTerminologyPage · DocumentationArchitecture