react-native-healthkit icon indicating copy to clipboard operation
react-native-healthkit copied to clipboard

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

Open robertherber opened this issue 1 year ago • 4 comments

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"]
      }]
    ]
  }
}

robertherber avatar Jun 19 '23 09:06 robertherber