Expo installation
This package cannot be used in the “Expo Go” app because it requires custom native code.
npx expo install
.
plugins
array of your app.json
or app.config.js
:
API
The plugin provides configuration options for both iOS and Android platforms. Every time you change the configuration or plugins, you’ll need to rebuild (andprebuild
) the native app. If no extra properties are added, defaults will be used.
iOS Configuration
healthSharePermission
(string): Sets the iOSNSHealthShareUsageDescription
permission message to theInfo.plist
. Defaults toAllow $(PRODUCT_NAME) to check health info
.healthUpdatePermission
(string): Sets the iOSNSHealthUpdateUsageDescription
permission message to theInfo.plist
. Defaults toAllow $(PRODUCT_NAME) to update health info
.isBackgroundDeliveryEnabled
(boolean): Addscom.apple.developer.healthkit.background-delivery
entitlement to the iOS project. Defaults totrue
.
Android Configuration
isBackgroundDeliveryEnabled
(boolean): Whether to enable background health data deliveries. Defaults totrue
.healthConnectPermissions
(string[]): Array of Health Connect Android permissions to add to the manifest. Defaults to[]
.
Capabilities
This plugin will enable the iOScom.apple.developer.healthkit
entitlement, but in order to sync this with the bundle identifier’s production capabilities you’ll need to do one of two things:
- Automatic: Build the app with EAS build
- Manual: Visit Apple developer portal and enable the HealthKit capability for your bundle identifier before building for production. This can also be done via Xcode.