Skip to content
AF
Capacitor and Cordova library

capacitor-health

JavaScript · npm: capacitor-health · latest 8.4.0 (2026-09-23) · registry read 2026-10-03

capacitor-health is a Capacitor plugin that queries Apple Health on iOS and Health Connect on Android through one TypeScript API; its README credits cordova-plugin-health for some of its parts and concepts. Its package metadata declares iOS and Android native code. The README documents one limit that shapes chart code: queryAggregated only buckets by day on Android, while hour and week buckets work on iOS only.

What it wraps

  • Apple HealthKit on iOS and Health Connect on Android. The README asks for the HealthKit entitlement and the two Info.plist usage strings on iOS, and a permissions-rationale activity plus per-type permissions on Android.

    “Capacitor plugin to query data from Apple Health and Google Health Connect”

    Source: README

Named in the registry description: Apple HealthKit, Health Connect.

Install

Add the plugin

npm install capacitor-health

From the README

Sync native projects

npx cap sync

From the README

Registry and repository facts

Read from npm and the repository by a script, not typed by hand. Where the metadata does not state something, the row says so. Dates are shown as dates, with the gap to our read, rather than as a verdict on whether the project is alive.

Latest version
8.4.0, published 2026-09-2310 days before our 2026-10-03 read
First published
2024-10-02 · 23 versions published
Licence
MITpackage.json license
Platforms
iOS, Androidpackage.json "capacitor" keys: ios, android
Requires
@capacitor/core >=8.0.0package.json peerDependencies
Last commit, default branch
2026-09-2310 days before our 2026-10-03 read · read by git on 2026-10-03
GitHub signals
20 stars · 6 open issues and PRs · not archived · last push to any branch 2026-09-23GitHub API, read 2026-10-03

Registry description: “Capacitor plugin for Apple Health and Google Health Connect”

What the README warns about

Each item is the project’s own statement, checked on 2026-10-03, quoted where the wording matters.

  • Daily buckets only on Android, for every aggregated type.

    “queryAggregated only supports bucket: 'day' on Android; 'hour' and 'week' work on iOS only.”

    Source: README

  • Flights vs floors. The README says the plugin exposes one cross-platform permission, READ_FLIGHTS_CLIMBED, while the underlying Android permission is android.permission.health.READ_FLOORS_CLIMBED, and that Health Connect can report fractional flights where Apple Health reports whole ones.

    Source: README

  • No writing app name on Android. The README says sourceName is iOS only.

    “Health Connect records carry no app name, so this is omitted on Android.”

    Source: README

  • Declare only what you request. The README warns that Health Connect shows every declared permission on the consent screen.

    Source: README

  • Thirty days of Android history, no more. The README says that, like every other query in the plugin, its nutrition query does not request READ_HEALTH_DATA_HISTORY.

    “Health Connect only returns data from 30 days before the permission was first granted.”

    Source: README

The API underneath

A wrapper inherits every rule of the API it calls. These pages cover that layer directly.

Other Capacitor and Cordova packages on this list

Capacitor and Cordova health plugins: every package side by side, and how to choose →

Questions

Why does capacitor-health reject an hourly bucket on Android?
Because the README documents that queryAggregated only supports bucket 'day' on Android, with 'hour' and 'week' working on iOS only, and says the limit applies to every aggregated data type. For hourly charts on Android, query raw records and bucket them yourself.
Can capacitor-health read Health Connect data older than 30 days?
Not according to its README, which says its queries do not request the READ_HEALTH_DATA_HISTORY permission, so Health Connect only returns data from 30 days before the permission was first granted. HealthKit on iOS has no such window.
Why is sourceName missing on Android in capacitor-health?
The README says sourceName, the name of the writing app, is iOS only because Health Connect records carry no app name, so the field is omitted on Android. Use the source bundle or package identifier the plugin returns instead if you need to tell writers apart.

Registry facts read by scripts/fetch-libraries.mjs on 2026-10-03 and refreshed weekly; the latest release was published 10 days before our 2026-10-03 read. README quotes identify the project’s own statements; the selection, grouping and comparisons are AIFitnessAPI’s. For tagged releases of the main bridges, see the SDK release tracker.

← All health and fitness libraries