Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kingstinct/react-native-healthkit/llms.txt

Use this file to discover all available pages before exploring further.

Choose your installation method based on your project setup.
HealthKit is only available on iOS devices and simulators. This library will not work on Android.

Expo installation

Usage with Expo is possible - just keep in mind it will not work in Expo Go and you’ll need to roll your own Dev Client.
1

Install the package

Install the package and its peer dependency:
npm install @kingstinct/react-native-healthkit react-native-nitro-modules
Or with yarn:
yarn add @kingstinct/react-native-healthkit react-native-nitro-modules
2

Configure the plugin

Update your app.json with the config plugin:
app.json
{
  "expo": {
    "plugins": ["@kingstinct/react-native-healthkit"]
  }
}
This will give you defaults that make the app build without any further configuration.
You can override the defaults:
app.json
{
  "expo": {
    "plugins": [
      ["@kingstinct/react-native-healthkit", {
        "NSHealthShareUsageDescription": "Your own custom usage description",
        "NSHealthUpdateUsageDescription": "Your own custom usage description",
        "background": true
      }]
    ]
  }
}
Plugin options:
  • NSHealthShareUsageDescription - Message shown when requesting read permissions
  • NSHealthUpdateUsageDescription - Message shown when requesting write permissions
  • background - Enable background delivery (default: false)
3

Build a new Dev Client

Build a new development client to include the native module:
npx expo run:ios
Or create a development build:
eas build --profile development --platform ios
The library will not work in Expo Go because it requires native code. You must use a development build.

Verify installation

To verify the installation was successful, try importing the library:
import { isHealthDataAvailable } from '@kingstinct/react-native-healthkit';

const isAvailable = isHealthDataAvailable();
console.log('HealthKit available:', isAvailable);
If this runs without errors, you’re ready to start using HealthKit!

Next steps

Quickstart

Build your first HealthKit integration

Authorization

Learn about requesting permissions