{"id":22412728,"url":"https://github.com/juliegibbs/react-native-health","last_synced_at":"2026-04-17T09:32:07.514Z","repository":{"id":237274481,"uuid":"783950151","full_name":"JulieGibbs/react-native-health","owner":"JulieGibbs","description":"A React Native package to interact with Apple HealthKit","archived":false,"fork":false,"pushed_at":"2024-04-08T22:31:08.000Z","size":1738,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T03:52:51.751Z","etag":null,"topics":["apple-healthkit","fitness","health","healthkit","ios","react-native"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JulieGibbs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-08T22:30:46.000Z","updated_at":"2024-04-10T00:33:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"59bf11d6-61e1-46d6-a450-bd28feabaa60","html_url":"https://github.com/JulieGibbs/react-native-health","commit_stats":null,"previous_names":["juliegibbs/react-native-health"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JulieGibbs/react-native-health","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulieGibbs%2Freact-native-health","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulieGibbs%2Freact-native-health/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulieGibbs%2Freact-native-health/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulieGibbs%2Freact-native-health/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JulieGibbs","download_url":"https://codeload.github.com/JulieGibbs/react-native-health/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JulieGibbs%2Freact-native-health/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31923122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T09:10:15.403Z","status":"ssl_error","status_checked_at":"2026-04-17T09:10:14.455Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-healthkit","fitness","health","healthkit","ios","react-native"],"created_at":"2024-12-05T14:10:06.880Z","updated_at":"2026-04-17T09:32:07.508Z","avatar_url":"https://github.com/JulieGibbs.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg style=\"float: left;\" src=\"https://i.imgur.com/q5PS8gU.png\"\u003e\n\n# React Native Health\n\nA React Native package to interact with Apple HealthKit for iOS. Maintained with ❤️ by [AE Studio](https://ae.studio).\n\nThis package allows access to health \u0026 fitness data exposed by Apple Healthkit. You can see the methods available [here](https://github.com/agencyenterprise/react-native-health#documentation).\n\nIf you are looking for a more robust solution providing normalized data, insights and recommendations based on user's biometric data, data from multiple sources (Fitbit, Oura), or a hosted solution, please check out the [Point SDK](https://www.areyouonpoint.co/) developed by our frens.\n\n# New Version\n\n(August 2023)\n\nWe're thrilled to share that we're in the midst of creating a significant update for this library. The upcoming version will be crafted using Swift (bye-bye, Objective-C! 👋) and will showcase a fresh new interface.\n\nWe're currently preparing to make it available for opt-in users in the near future, and we're extending a warm invitation for you all to join us in shaping this endeavor.\n\nAs we are fully focused in it, we're temporarily holding off on introducing new features. However, we're eagerly welcoming pull requests that address critical bug fixes or tackle dependency issues. Your contributions will not only be highly appreciated but also swiftly integrated and deployed. 💖\n\n# Discord\n\n\u003ca href=\"https://discord.gg/d24g5XDePr\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-join%20chat-738bd7.svg\" alt=\"React Native Health official Discord\"\u003e\u003c/a\u003e\n\n## Getting Started\n\n\u003e 🚨 Expo: This package is not available in the [Expo Go](https://expo.io/client) app. Learn how you can use it with [custom dev clients](/docs/Expo.md).\n\n### Automatic Installation\n\n1. Install the react-native-health package from [npm](https://www.npmjs.com/package/react-native-health)\n\n```\nyarn add react-native-health\n```\n\n2. If you are using [CocoaPods](https://cocoapods.org/) you can run the following\n   from the `ios/` folder of your app\n\n```\npod install\n```\n\nOr, if you need to manually link it, run\n\n```\nreact-native link react-native-health\n```\n\n3. Update the `ios/\u003cProject Name\u003e/info.plist` file in your project\n\n```\n\u003ckey\u003eNSHealthShareUsageDescription\u003c/key\u003e\n\u003cstring\u003eRead and understand health data.\u003c/string\u003e\n\u003ckey\u003eNSHealthUpdateUsageDescription\u003c/key\u003e\n\u003cstring\u003eShare workout data with other apps.\u003c/string\u003e\n\u003c!-- Below is only required if requesting clinical health data --\u003e\n\u003ckey\u003eNSHealthClinicalHealthRecordsShareUsageDescription\u003c/key\u003e\n\u003cstring\u003eRead and understand clinical health data.\u003c/string\u003e\n```\n\nTo add Healthkit support to your application's `Capabilities`\n\n- Open the `ios/` folder of your project in Xcode\n- Select the project name in the left sidebar\n- In the main view select '+ Capability' and double click 'HealthKit'\n\nTo enable access to clinical data types, check the `Clinical Health Records` box.\n\n## Usage\n\nIn order to start collecting or saving data to HealthKit, you need to request\nthe user's permissions for the given data types. It can be done in the following\nway\n\n```typescript\nimport AppleHealthKit, {\n  HealthValue,\n  HealthKitPermissions,\n} from 'react-native-health'\n\n/* Permission options */\nconst permissions = {\n  permissions: {\n    read: [AppleHealthKit.Constants.Permissions.HeartRate],\n    write: [AppleHealthKit.Constants.Permissions.Steps],\n  },\n} as HealthKitPermissions\n\nAppleHealthKit.initHealthKit(permissions, (error: string) =\u003e {\n  /* Called after we receive a response from the system */\n\n  if (error) {\n    console.log('[ERROR] Cannot grant permissions!')\n  }\n\n  /* Can now read or write to HealthKit */\n\n  const options = {\n    startDate: new Date(2020, 1, 1).toISOString(),\n  }\n\n  AppleHealthKit.getHeartRateSamples(\n    options,\n    (callbackError: string, results: HealthValue[]) =\u003e {\n      /* Samples are now collected from HealthKit */\n    },\n  )\n})\n```\n\n### Background Processing\n\nFor background capabilities, Apple allows developers to setup long running observer\nqueries for the health types needed.\n\nTo set that up in your app, in XCode open your `ios/AppDelegate.m` file and add the\nfollowing statements:\n\n```objective-c\n#import \"AppDelegate.h\"\n\n...\n\n/* Add the library import at the top of AppDelegate.m */\n#import \"RCTAppleHealthKit.h\"\n\n...\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application\n    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n\n  RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self\n                                            launchOptions:launchOptions];\n\n  ...\n\n  /* Add Background initializer for HealthKit  */\n  [[RCTAppleHealthKit new] initializeBackgroundObservers:bridge];\n\n  ...\n\n  return YES;\n}\n```\n\nAfter that you can start listening for data updates using the React Native\nclient. For more information, see [background observers](/docs/background.md).\n\n## Documentation\n\nAll the documentation is under the [docs](/docs) folder. They are split into the following categories:\n\n### Constants\n\n- [Activities](/docs/activities.md)\n- [Observers](/docs/observers.md)\n- [Permissions](/docs/permissions.md)\n- [Units](/docs/units.md)\n\n### Base Methods\n\n- [isAvailable](/docs/isAvailable.md)\n- [initHealthKit](/docs/initHealthKit.md)\n- [getAuthStatus](/docs/getAuthStatus.md)\n\n### Background Methods\n\n- [background observers](/docs/background.md)\n- [initStepCountObserver](/docs/initStepCountObserver.md) - _DEPRECATED_\n- [setObserver](/docs/setObserver.md) - _DEPRECATED_\n\n### Activity Methods\n\n- [getActiveEnergyBurned](/docs/getActiveEnergyBurned.md)\n- [getBasalEnergyBurned](/docs/getBasalEnergyBurned.md)\n- [getAppleStandTime](/docs/getAppleStandTime.md)\n\n### Body Methods\n\n- [getLatestHeight](/docs/getLatestHeight.md)\n- [getLatestWeight](/docs/getLatestWeight.md)\n- [getHeightSamples](/docs/getHeightSamples.md)\n- [getWeightSamples](/docs/getWeightSamples.md)\n- [getBodyTemperatureSamples](/docs/getBodyTemperatureSamples.md)\n- [getLatestBodyFatPercentage](/docs/getLatestBodyFatPercentage.md)\n- [getBodyFatPercentageSamples](/docs/getBodyFatPercentageSamples.md)\n- [getLatestLeanBodyMass](/docs/getLatestLeanBodyMass.md)\n- [getLeanBodyMassSamples](/docs/getLeanBodyMassSamples.md)\n- [saveHeight](/docs/saveHeight.md)\n- [saveWeight](/docs/saveWeight.md)\n- [saveBodyFatPercentage](/docs/saveBodyFatPercentage.md)\n- [saveBodyTemperature](/docs/saveBodyTemperature.md)\n- [saveLeanBodyMass](/docs/saveLeanBodyMass.md)\n\n### Characteristic Methods\n\n- [getBiologicalSex](/docs/getBiologicalSex.md)\n- [getDateOfBirth](/docs/getDateOfBirth.md)\n\n### Clinical Records Methods\n\n- [getClinicalRecords](/docs/getClinicalRecords.md)\n\n### Dietary Methods\n\n- [getEnergyConsumedSamples](/docs/getEnergyConsumedSamples.md)\n- [getProteinSamples](/docs/getProteinSamples.md)\n- [getFiberSamples](/docs/getFiberSamples.md)\n- [getTotalFatSamples](/docs/getTotalFatSamples.md)\n- [saveFood](/docs/saveFood.md)\n- [saveWater](/docs/saveWater.md)\n- [getWater](/docs/getWater.md)\n- [getWaterSamples](/docs/getWaterSamples.md)\n- [getFiberSamples](/docs/getFiberSamples.md)\n- [getInsulinDeliverySamples](/docs/getInsulinDeliverySamples.md)\n- [saveInsulinDeliverySamples](/docs/saveInsulinDeliverySample.md)\n- [deleteInsulinDeliverySamples](/docs/deleteInsulinDeliverySample.md)\n\n### Fitness Methods\n\n- [getDailyStepCountSamples](/docs/getDailyStepCountSamples.md)\n- [getStepCount](/docs/getStepCount.md)\n- [getSamples](docs/getSamples.md)\n- [getDailyDistanceWalkingRunningSamples](/docs/getDailyDistanceWalkingRunningSamples.md)\n- [getDistanceWalkingRunning](/docs/getDistanceWalkingRunning.md)\n- [getDailyDistanceSwimmingSamples](/docs/getDailyDistanceSwimmingSamples.md)\n- [getDistanceSwimming](/docs/getDistanceSwimming.md)\n- [getDailyDistanceCyclingSamples](/docs/getDailyDistanceCyclingSamples.md)\n- [getDistanceCycling](/docs/getDistanceCycling.md)\n- [getDailyFlightsClimbedSamples](/docs/getDailyFlightsClimbedSamples.md)\n- [getFlightsClimbed](/docs/getFlightsClimbed.md)\n- [saveSteps](/docs/saveSteps.md)\n- [saveWalkingRunningDistance](/docs/saveWalkingRunningDistance.md)\n\n### Hearing Methods\n\n- [getEnvironmentalAudioExposure](/docs/getEnvironmentalAudioExposure.md)\n- [getHeadphoneAudioExposure](/docs/getHeadphoneAudioExposure.md)\n\n### Lab Tests Methods\n\n- [getBloodAlcoholContentSamples](/docs/getBloodAlcoholContentSamples.md)\n- [getBloodGlucoseSamples](/docs/getBloodGlucoseSamples.md)\n- [getLatestBloodAlcoholContent](/docs/getLatestBloodAlcoholContent.md)\n- [saveBloodAlcoholContent](/docs/saveBloodAlcoholContent.md)\n- [saveBloodGlucoseSample](/docs/saveBloodGlucoseSample.md)\n- [deleteBloodGlucoseSample](/docs/deleteBloodGlucoseSample.md)\n\n### Nutrition\n\n- [getCarbohydratesSamples](/docs/getCarbohydratesSamples.md)\n- [saveCarbohydratesSample](/docs/saveCarbohydratesSample.md)\n- [deleteCarbohydratesSample](/docs/deleteCarbohydratesSample.md)\n\n### Mindfulness Methods\n\n- [getMindfulSession](docs/getMindfulSession.md)\n- [saveMindfulSession](/docs/saveMindfulSession.md)\n\n### Sleep Methods\n\n- [getSleepSamples](/docs/getSleepSamples.md)\n\n#### Vitals Methods\n\n- [getBloodPressureSamples](/docs/getBloodPressureSamples.md)\n- [getElectrocardiogramSamples](/docs/getElectrocardiogramSamples.md)\n- [saveHeartRateSample](/docs/saveHeartRateSample.md)\n- [getHeartRateSamples](/docs/getHeartRateSamples.md)\n- [getHeartRateVariabilitySamples](/docs/getHeartRateVariabilitySamples.md)\n- [getHeartbeatSeriesSamples](/docs/getHeartbeatSeriesSamples.md)\n- [getOxygenSaturationSamples](/docs/getOxygenSaturationSamples.md)\n- [getRestingHeartRateSamples](/docs/getRestingHeartRateSamples.md)\n- [getVo2MaxSamples](/docs/getVo2MaxSamples.md)\n- [getLatestBmi](/docs/getLatestBmi.md)\n- [getBmiSamples](/docs/getBmiSamples.md)\n- [getRespiratoryRateSamples](/docs/getRespiratoryRateSamples.md)\n- [getWalkingHeartRateAverage](/docs/getWalkingHeartRateAverage.md)\n- [saveBmi](/docs/saveBmi.md)\n\n#### Workout Methods\n\n- [getSamples](docs/getSamples.md)\n- [getAnchoredWorkouts](/docs/getAnchoredWorkouts.md)\n- [saveWorkout](/docs/saveWorkout.md)\n- [getWorkoutRouteSamples](/docs/getWorkoutRouteSamples.md)\n\n## Additional Information\n\n### Permissions\n\nDue to Apple's privacy model, if a user has previously denied a\nspecific permission they will not be prompted again for that permission.\nThe user will need to go into the Apple Health app and grant the\npermission to your app.\n\nFor any data written to Healthkit, an authorization error can be caught. If\nan authorization error occurs, you can prompt the user to set the\nspecific permission or add the permission to the options object when\ninitializing the library.\n\nIf extra read or write permissions are added to the options object, the\napp will request the user's permission when the library is\ninitialized again.\n\n### Manual Installation\n\n1. Run `yarn add react-native-health`\n2. In XCode, in the project navigator, right-click `Libraries` ➜ `Add Files to [your project's name]`\n3. Go to `node_modules` ➜ `react-native-health` and add `RCTAppleHealthkit.xcodeproj`\n4. In XCode, in the project navigator, select your project. Add `libRCTAppleHealthkit.a`\n   to your project's `Build Phases` ➜ `Link Binary With Libraries`\n5. Click `RCTAppleHealthkit.xcodeproj` in the project navigator and go\n   the `Build Settings` tab. Make sure 'All' is toggled on (instead of 'Basic').\n   In the `Search Paths` section, look for `Header Search Paths` and make sure\n   it contains both `$(SRCROOT)/../../react-native/React`\n   and `$(SRCROOT)/../../../React` - mark both as `recursive`.\n6. Enable Healthkit in your application's `Capabilities`\n   ![](https://i.imgur.com/Ql1kXCg.png 'Xcode Capabilities Section')\n7. Compile and run\n\n## Contributing\n\nWe appreciate any requests and contributions to `react-native-health`.\nThe [issues](https://github.com/agencyenterprise/react-native-health/issues) tracker\nis used to keep a list of features and bugs to be worked on. Please see our\n[contributing documentation](https://github.com/agencyenterprise/react-native-health/blob/master/CONTRIBUTING.md)\nfor some tips on getting started.\n\n## References\n\n- [Apple Healthkit Documentation](https://developer.apple.com/documentation/healthkit)\n\n## Android Alternative\n\nIf your app needs an Android + Health Connect integration, your princess is in another castle. You can use the package [React Native Health Connect](https://github.com/matinzd/react-native-health-connect) maintained by one of the community's dev.\n\nIn case of questions or if you just want to congratz the author, you can reach out to him on our [Discord Server](https://github.com/agencyenterprise/react-native-health#discord).\n\n## Acknowledgement\n\n\u003e _This package is a fork of [rn-apple-healthkit](https://github.com/terrillo/rn-apple-healthkit)_\n\n\u003e _This package also inherits additional features from [Nutrisense](https://www.nutrisense.io/) fork_\n\n## Plz I Still Need Halp\n\nThis package is maintained with ❤️ by [AE Studio](https://ae.studio). We will do our best to respond to requests and support for this package so please get in touch! If you require more extensive help or have other design, data science or development needs - we are a full service product development agency and can build pretty much anything so hit us up!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliegibbs%2Freact-native-health","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliegibbs%2Freact-native-health","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliegibbs%2Freact-native-health/lists"}