iOS
Enable HealthKit and add the Info.plist usage descriptions for the health plugin on iOS.
On iOS, the plugin uses Apple HealthKit. It requires iOS 13.0 or higher.
Enable the HealthKit capability
In your Xcode project, open Targets → Runner → Signing & Capabilities and add HealthKit.
Add usage descriptions to Info.plist
Add both keys, each with the user-facing rationale for your app:
ios/Runner/Info.plist
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_RATEandATRIAL_FIBRILLATION_BURDEN. - When you write data,
recordingMethodmust bemanualorautomatic.
See Permissions for the iOS permission model.
iOS-only write types
| Type | Constraint |
|---|---|
| Audiogram | Can be written on iOS only. |
| Insulin delivery | Can be written on iOS only. Requires a valid reason: basal or bolus. |
See Writing data for examples.