kingstinct / react-native-healthkit

HealthKit bindings for React Native with TypeScript
https://kingstinct.com/react-native-healthkit/
MIT License
238 stars 49 forks source link

Add Clinical Records support again - opt-in with the Expo Config Plugin #68

Open robertherber opened 1 year ago

robertherber commented 1 year ago

We have an old branch with health record implemented, but it was removed because it can be a blocker for app submissions if not actually using it.

I think it'd now be possible to lift this back in again - by extending the Expo Config Plugin to support opt-in to use this API. As part of this we need to make sure the Swift code referring to this is only included if the developer opts-in to use it.

The most natural way to include it would probably be to support setting the following info.plist entries in the config plugin, and only if these properties are set include the needed Swift code in the binary:

{
  "expo": {
    "plugins": [
      ["@kingstinct/react-native-healthkit", {
        "NSHealthClinicalHealthRecordsShareUsageDescription": "Your own custom usage description",
        "NSHealthRequiredReadAuthorizationTypeIdentifiers": ["allergyRecord"]
      }]
    ]
  }
}
djMax commented 8 months ago

any action on this one? We'd love to try and integrate it. I assume I should not try the 4.x one at this point.

robertherber commented 8 months ago

@djMax PRs welcome! :)

It's not currently aligning with any of our product roadmaps sadly, but we could also consider doing it on a contract basis if that’s of interest for you.

djMax commented 8 months ago

It might be, we're trying to figure out how many people are likely to have relevant clinical records (mainly allergies and similar) to figure out if it's worth doing. How long in "contractable hours" would you think it might take, roughly? We also are working with Software Mansion, and perhaps that's a bit of a hybrid approach that yields a good contribution to the open source module.

robertherber commented 8 months ago

@djMax It's hard to give an exact estimate until giving it a try. I would say probably somewhere in the range 20-60 hours.