Saving Blood Pressure to HealthKit

Hi.

I am working on a health-related app using Expo and I have now come over a big obstacle.

It seems that there are no libraries that currently support saving blood pressure or heart rate in the Apple Health app.

Can I get some guidance on how exactly I can save this kind of data from the Expo app to the Health app, please? :slight_smile:

Hi @radu04

A quick search turned up @kingstinct/react-native-healthkit which looks like it supports that sort of thing.

Based on the installation instructions it does not look like it needs a config plugin, but it must be built with EAS Build (as opposed to expo build), and it will not work in the Expo Go app. You would need to build a custom dev client and use that for development instead of Expo Go.

You will also need to add the HealthKit capability to your entitlements. I’m not familiar with this part of the process, but I think you just need to add the entitlements to the “ios” section of your app.json like this:

{
  "expo": {
    [...]
    "ios": {
      "entitlements": {
        "com.apple.developer.healthkit": true
      },
      "infoPlist": {
        "NSHealthUpdateUsageDescription": "...",
        "NSHealthShareUsageDescription": "..."
      }
    }
  }
}

See the following for more details:

EDIT: You will not need to run “pod install”, because that is done for you by EAS Build.

1 Like

Hi @wodin,

Thank you for your detailed messages. It seems that I have somehow overlooked this library and its capabilities.

I will try to use this. :slight_smile: