Sonar Developers

Mobile SDKs

Send your users' phone health data to Sonar from your app, and read it back through the API.

5 min read Updated Sep 24, 2026

Cloud providers such as Garmin connect to Sonar server to server. See Cloud Device Providers. Apple Health and Health Connect data live only on the phone, so an app on that phone has to read it and send it. The Sonar mobile SDK does that part.

The SDK only sends data. Your backend still creates users and reads their data through the API, and your API key never goes into the app.

Apple Health on iOS is available to every customer today. The Android SDK for Health Connect and Samsung Health is in early access.

What Is Available

SDK Package Status
iOS (Swift) SonarSDK, Swift package or CocoaPod from https://github.com/Sonar-Health/sonar-ios-sdk Available. Apple Health. iOS 16 or later, Xcode 26 or later
React Native npm @sonarhealth/react-native-sdk Available for iOS. An Expo module (Expo SDK 54 or later) that wraps the iOS SDK
Android (Kotlin) co.sonarhealth:sonar-sdk Early access. Health Connect and Samsung Health. Contact us to join

The React Native package already builds for Android, so one codebase ships to both platforms. Android calls start working when the Android SDK leaves early access.

How Data Moves

Health records go straight from the SDK to Sonar. They do not pass through your backend. Your backend reads the processed results through the API and gives your app what it needs.

Mobile SDK architecture

Data flow
Native records go to Sonar. Product data returns through your backend.On the mobile device, the native health store supplies records to the Sonar SDK inside your app. The SDK uploads directly to Sonar ingestion, bypassing your backend. Sonar normalizes the records and exposes them through the public API. Your backend reads the API using its key and returns product data to the app UI. Arrows show the direction of health data, not API requests or session setup. Mobile device Sonar cloud Your app Health store Sonar SDK App UI Ingestion Unified API Your backend API key Native records go to Sonar. Product data returns through your backend.On the mobile device, the health store supplies records to the Sonar SDK inside your app. The SDK uploads directly to Sonar ingestion. Normalized data is available through the public API. Your backend reads the API using its key and returns product data to the app UI. Arrows follow health data; session setup and API requests are not shown. Mobile device Health store Your app Sonar SDK App UI Sonar cloud Ingestion Unified API Your backend API key
Native records Product data
  1. Your backend creates a Sonar user and, when the app asks, a single-use client token for that user.
  2. The SDK trades the client token for its own session and keeps that session fresh by itself.
  3. The user connects Apple Health. The SDK asks for permission, then sends recent days first and works back through the history period, two years by default. New data follows as the phone records it.
  4. Sonar processes the data and sends your backend a subject.synced webhook.
  5. Your backend reads the data with its API key.

See SDK Authentication, Supported Native Data, and SDK Synchronization for each step.

Who Does What

Part Does
Your mobile app Configures the SDK, supplies client tokens, connects Apple Health, shows state and recovery steps
Your backend Maps your signed-in user to a Sonar user, mints client tokens, receives webhooks, reads data through the API, sets consolidation
Sonar SDK Asks for Health permission, reads and sends the data, keeps its session fresh
Sonar Checks the app and user, normalizes and consolidates the data, serves the API

Rules That Do Not Change

  • Your API key stays on your backend.
  • Each app installation has its own session.
  • The operating system decides what the app may read. Users can grant only some types, or change their mind later. Your app has to handle both.
  • The SDK and your API reads use the same Sonar user.

Good to Know

  • Records deleted in Apple Health stay in Sonar. See Edits and Deletions.
  • History goes back two years by default. You can choose from one month to five years. See History Period.
  • iOS decides when background syncs run. A locked phone syncs after the next unlock.
  • Edits in Apple Health to data from about the last week reach Sonar on their own. Older edits need resync.
  • One phone per provider per user. If the same user connects Apple Health on a second phone, the newest phone takes over the connection and the older one stops sending.

Guides