Skip to content

@capgo/capacitor-health

Capacitor plugin to interact with data from Apple HealthKit and Health Connect.

Capacitor plugin to interact with data from Apple HealthKit and Health Connect.

  • isAvailable - Returns whether the current platform supports the native health SDK.
  • requestAuthorization - Requests read/write access to the provided data types.
  • checkAuthorization - Checks authorization status for the provided data types without prompting the user.
  • readSamples - Reads samples for the given data type within the specified time frame.
MethodDescription
isAvailableReturns whether the current platform supports the native health SDK.
requestAuthorizationRequests read/write access to the provided data types.
checkAuthorizationChecks authorization status for the provided data types without prompting the user.
readSamplesReads samples for the given data type within the specified time frame.
saveSampleWrites a single sample to the native health store.
getPluginVersionGet the native Capacitor plugin version.
openHealthConnectSettingsOpens the Health Connect settings screen (Android only). On iOS, this method does nothing.
showPrivacyPolicyShows the app’s privacy policy for Health Connect (Android only). On iOS, this method does nothing.
queryWorkoutsQueries workout sessions from the native health store. Supported on iOS (HealthKit) and Android (Health Connect).
queryAggregatedQueries aggregated health data from the native health store. Aggregates data into time buckets (hour, day, week, month) with operations like sum, average, min, or max. This is more efficient than fetching individual samples for large date ranges.

This reference is synced from src/definitions.ts in capacitor-health.