For the complete documentation index, see llms.txt. This page is also available as Markdown.

React 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.

Starting from version 5.2.0, the Thryve React Native SDK, supports integration via the new Samsung Health Data for Android exclusively. Read more on the Thryve Samsung Health module

Configuration of projects

To integrate the Thryve React Native SDK into a bare React Native, follow the steps below for installing the packages. If you are using React Native Expo, please refer to the dedicated page.

Install packages

Download the .tgz package files provided by Thryve and place them in a directory inside your project (e.g. ./packages/). Then install the core SDK and the individual module packages for the integrations your app uses.

# Install the core SDK
npm install ./packages/thryve-react-native-sdk-<version>.tgz

# Install only the modules you need
npm install ./packages/thryve-react-native-hconnect-module-<version>.tgz   # Health Connect (Android only)
npm install ./packages/thryve-react-native-samsung-health-module-<version>.tgz    # Samsung Health (Android only)
npm install ./packages/thryve-react-native-apple-health-module-<version>.tgz # Apple HealthKit (iOS only)
npm install ./packages/thryve-react-native-shenai-module-<version>.tgz     # ShenAI (Android & iOS)

Replace <version> with the version number of the package files you received (e.g. 5.2.1). After installation your package.json dependencies will reference the local .tgz paths:

"dependencies": {
  "@thryve/react-native-sdk": "./packages/thryve-react-native-sdk-5.2.1.tgz",
  "@thryve/react-native-hconnect-module": "./packages/thryve-react-native-hconnect-module-5.2.1.tgz",
  "@thryve/react-native-samsung-health-module": "./packages/thryve-react-native-samsung-health-module-5.2.1.tgz",
  "@thryve/react-native-apple-health-module": "./packages/thryve-react-native-apple-health-module-5.2.1.tgz",
  "@thryve/react-native-shenai-module": "./packages/thryve-react-native-shenai-module-5.2.1.tgz"
}

Setup Android configuration

Configure Nexus Maven repository (android/settings.gradle)

Add the Thryve Nexus repository so Gradle can resolve the native Android dependencies. Credentials are read from android/local.properties first, falling back to environment variables — keep them out of source control.

Add your credentials to android/local.properties (this file should be in .gitignore):

Add Thryve SDK dependencies (android/app/build.gradle)

Add the required runtime dependencies:

Define Android SDK versions (android/build.gradle)

Ensure your project-level build.gradle targets the required SDK versions:

Configure project when using Health Connect

For more details exceeding below explanations, please refer to the sample code demonstrating the SDK configuration.

Android Manifest

When using Health Connect you need to declare the that your app will query HealthConnect and display the permission rational as well as declare the data types you intend to use. Do this in your android/app/src/main/AndroidManifest.xml .

Import HEALTH_CONNECT_PERMISSIONS from @thryve/react-native-sdk/permissions as a reference for all available permission strings.

Health Permission resource

List the same Health Connect permissions that you declared in the manifest in android/app/src/main/res/values/health_permissions.xml .

Permission activity

Additionally you need to create this file in your app's package directory (android/app/src/main/java/<your.package>/PermissionsActivity.kt ):

Replace your.app.package in above path with your actual application package name (e.g. com.example.myapp).

Configure project when using Samsung Health

When allowing users to connect to Samsung Health ensure to declare queries in your android/app/src/main/AndroidManifest.xml .

Setup iOS configuration

Configure the Podfile

Add the Thryve CocoaPods source in your ios/Podfile and include only the subspecs your app uses:

After you have added the configuration, ensure to run:

Configure the Info.plist

Add the required usage descriptions in ios/<YourApp>/Info.plist :

Configure the required entitlements

When using Apple Health add the following HealthKit entitlements in your ios/<YourApp>/<YourApp>.entitlements .

Common issues

iOS build error: Typedef redefinition with different types in RCT-Folly/folly/portability/Time.h

Some users have reported the following error when building for iOS:

Option 1: Add the following sed command to your post_install block in ios/Podfile:

Option 2: If the above does not resolve the issue, open ios/Pods/RCT-Folly/folly/portability/Time.h and comment out the offending line:

Migrating to React Native SDK 5.2.0

Breaking changes

Samsung Health data types replaced

The entire ThryveSamsungHealthDataType enum has been replaced to align with the new Samsung Health data model. All previous values are removed with no backwards-compatible aliases.

You must update every reference in your app to use the new values listed in the ThryveSamsungHealthDataType reference.

Last updated