I'm working on a React Native Expo app and encountering the following error:
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'HealthConnect' could not be found. Verify that a module by this name is registered in the native binary.
Steps to reproduce:
- I created the expo native project
- I followed the documentation of the Git repositories.:
- The app fails to build and crashes when trying to interact with the HealthConnect module.
Additional Info:
- react-native: 0.76.7
- react-native health connect: 3.3.2
- android: 13
{
"expo": {
"name": "NDMobileApp",
"slug": "NDMobileApp",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.anonymous.NDMobileApp",
"permissions": [
"android.permission.health.READ_STEPS"
]
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
"./androidManifestPlugin.js",
"expo-health-connect",
[
"expo-build-properties",
{
"android": {
"compileSdkVersion": 34,
"targetSdkVersion": 34,
"buildToolsVersion": "34.0.0",
"minSdkVersion": 26
}
}
]
]
}
}
Question: Is there a specific step I'm missing for integrating HealthConnect in an Expo project? Are there any configurations I need to verify to ensure that the native module is properly registered? Has anyone else encountered this issue when using HealthConnect with React Native and Expo?
I want to properly initialize HealthConnect and retrieve fitness data in my app.