Mobile Health Data
Integrate mobile health data with BlueNexus using the Thryve SDK.
Note: This guide covers mobile-only data sources: Apple Health (iOS), Health Connect (Android), and Samsung Health (Android). These services don't provide web APIs - the data must be collected directly from the smartphone. Most other BlueNexus data sources (Fitbit, Garmin, Strava, etc.) are directly available through the BlueNexus platform without requiring mobile SDK integration.
Why Thryve?
BlueNexus uses Thryve to collect data from these mobile-only sources because they require native mobile app integration. Here's how it works:
Thryve's role: Initialize the SDK in your mobile app and push health data from the device
BlueNexus's role: Access, read, and process all the data through the BlueNexus API
You only use Thryve for data collection. Once the data is pushed to Thryve's platform, it automatically syncs to BlueNexus where you can access it alongside all your other health data sources through a unified API.
For additional Thryve data sources beyond Apple Health, Health Connect, and Samsung Health, see Thryve documentation.
Prerequisites
BlueNexus account, authenticated to use the token for fetching Thryve credential
Thryve SDK packages (.tgz files) - Provided by BlueNexus support(contact [email protected])
Thryve credentials (
authIdandauthSecret) - Provided by BlueNexus supportmacOS with Xcode 15+, Node.js 18+, Expo SDK 54+
iOS 17.0+ device
Installation
1. Add SDK Packages
2. Configuration
Configure your app with the BlueNexus API URL:
iOS Configuration
iOS requires HealthKit entitlements, Info.plist permissions, and CocoaPods configuration.
For complete iOS setup with Expo config plugins, see the React Native Example Repository.
Key requirements:
HealthKit entitlement enabled
NSHealthShareUsageDescriptionin Info.plistThryve CocoaPods source:
https://git.thryve.de/thryve/Specs.gitiOS deployment target: 17.0+
Build:
BlueNexus API Integration
Credentials Endpoint
Your app must fetch the user's Thryve credentials from the BlueNexus API:
The endUserAlias is a unique identifier that links the user to Thryve. Your app must authenticate with BlueNexus to obtain an access token before calling this endpoint. See BlueNexus Authentication Guide.
How It Works
Flow:
App initializes SDK → Fetches
endUserAliasfrom BlueNexus backendUser grants permissions → iOS HealthKit dialog
App triggers sync → SDK reads data from Apple Health
Data uploads to Thryve platform
Data becomes available via BlueNexus API
Usage
The following example shows how to use the Thryve SDK in your app. These functions (initializeThryveSDK, startHealthSync, etc.) are custom wrapper utilities that you need to implement in your app - they are not part of the Thryve SDK package itself.
These wrappers integrate the Thryve SDK with BlueNexus by handling credential fetching and providing a cleaner API. The implementation shown below is taken from the React Native Example Repository (features/thryve).
Note: Data appears in BlueNexus API within 1-3 minutes. Backfill functions are optional and can be used independently based on your needs.
Default Health Metrics
The SDK syncs these metrics by default:
Activity
Steps, Walking/Running Distance, Cycling, Active Energy
Heart
Heart Rate
Sleep
Sleep Analysis
Body
Weight, Height
Troubleshooting
"Unable to find specification for 'ThryveCommons'"
Run
npm run prebuild:cleanVerify
ios/Podfilecontains:source 'https://git.thryve.de/thryve/Specs.git'Check
withThryvePodfile.jsis listed inapp.jsonplugins
"Thryve credentials not configured"
Check
.envfile hasEXPO_PUBLIC_THRYVE_AUTH_IDandEXPO_PUBLIC_THRYVE_AUTH_SECRET
"No endUserAlias received"
Verify BlueNexus API endpoint
/api/v1/integrations/thryve/credentialsis accessibleCheck authentication with BlueNexus is working
Permission dialog doesn't appear
Run
npm run prebuild:cleanVerify HealthKit entitlement in
ios/YourApp/YourApp.entitlementsCheck
NSHealthShareUsageDescriptioninapp.json
No data after sync
Wait 1-3 minutes for backend processing
Verify permissions granted in iOS Settings → Privacy & Security → Health
Check Apple Health app has data (add sample data if needed)
Resources
React Native Example - Complete working implementation
Thryve Docs - Platform documentation, data sources, and advanced features
Apple HealthKit - HealthKit documentation
Support: [email protected]
Last updated

