reactReact Native

Thryve provides React Native SDK and modules that are using the Thryve native SDKs.

The React Native wrapper for the native SDKs supports all functionalities of the native SDKs unless stated differently.

Configuration of projects

The SDK supports both React Native CLI and React Native Expo projects. Follow the guide below to configure your project.

In the package.json file, include dependencies by specifying the path to each within your project. Ensure that @thryve/react-native-core-sdk is included, as it is a prerequisite for all optional modules or packages.

"dependencies": {
    "@thryve/react-native-sdk": "file:../../thryve-react-native-sdk-5.0.1.tgz",
    "@thryve/react-native-apple-health-module": "file:../../thryve-react-native-apple-health-module-5.0.1.tgz",
    "@thryve/react-native-health-connect-module": "file:../../thryve-react-native-health-connect-module-5.0.1.tgz",
    "@thryve/react-native-shealth-module": "file:../../thryve-react-native-shealth-module-5.0.1.tgz",
     "@thryve/react-native-shenai-module": "file:../../thryve-react-native-shenai-module-5.0.1.tgz",
    "react": "19.0.0",
    "react-native": "0.78.2"
},
"devDependencies": {
     "@types/react": "^19.0.0",
},    

Run below commands to install all necessary dependencies defined in your package.json file, ensuring that your project has all the modules it requires:

  • Run npm install or yarn install

  • Run cd ios && pod install && cd ..

circle-info

For more details refer to the sample codearrow-up-right demonstrating the SDK configuration.

Configurations specific to native plattforms

When developing applications with React Native that utilize Thryve's SDKs, platform-specific configurations might be required to ensure seamless integration and functionality across iOS and Android devices.

When building for iOS, you might encounter the following error: RCT-Folly/folly/portability/Time.h:52:17: Typedef redefinition with different types ('uint8_t' (aka 'unsigned char') vs 'enum clockid_t')

To resolve the error, add the following line to your Podfile under post_install:

If this does not resolve the issue, navigate to ios/Pods/RCT-Folly/folly/portability/Time.h and comment out the line:

Last updated