Access HealthKit seamlessly and effortlessly with Expo and React Native

  • ✅ All 100+ Quantity Types
  • ✅ All 63+ Category Types
  • ✅ All 75+ Workout Types
  • ✅ Save, query and subscribe to data
  • ✅ TypeScript, Promise-based, Expo Plugin
  • ✅ Convenient hooks
  • Future-proof - mapping closely to the Native API

1. Install with Expo ⚙️

  1. Install dependency

    yarn install @kingstinct/react-native-healthkit
    Copy
  2. Add Config Plugin to your app.json/app.config.js

    {
      "expo": {
        "plugins": [
          "@kingstinct/react-native-healthkit"
        ]
      }
    }
    Copy
  3. Build a new Dev Client
// --- 2. Authorize 🔒 ---

import { 
  Text, 
  Button,
  View
} from 'react-native';
import { 
  HKQuantityTypeIdentifier, 
  useHealthkitAuthorization 
} from '@kingstinct/react-native-healthkit';

export default () => {
  const [
    authorizationStatus, 
    requestAuthorization
  ] = useHealthkitAuthorization([
    HKQuantityTypeIdentifier.bloodGlucose
  ])

  return <View>
    <Text>Authorization Status: {authorizationStatus}</Text>
    <Button 
      onPress={requestAuthorization} 
      title="Request Authorization" 
    />
  </View>
}
// --- 3. Launch 🚀 ---

import { 
  Text, 
  View
} from 'react-native';
import { 
  useMostRecentQuantitySample, 
  HKQuantityTypeIdentifier,
} from '@kingstinct/react-native-healthkit';

export default () => {
  const sample = useMostRecentQuantitySample(
    HKQuantityTypeIdentifier.bloodGlucose
  )

  return <View>
    <Text>Blood Glucose: {sample?.quantity}</Text>
  </View>
}
HealthKit Logo
@kingstinct/react-native-healthkit
GitHub Logo
1. Install ⚙️ 2. Authorize 🔒 3. Launch 🚀