Skip to main content
The Klaritics React Native SDK lets you write your integration once in JavaScript and run the same code on Android and iOS. You never write native Java/Kotlin or Swift/Objective-C. Package: @deeptaai/klaritics-react-native-sdk · Version: 1.0.0

Requirements

You need a Project ID and a Host URL from the Klaritics dashboard. Your project ID is available on the Getting Started page of the dashboard.

Installation

React Native 0.60+ autolinks the native module. There is no react-native link, no MainApplication edits, and no settings.gradle changes required.

Android setup

The Klaritics Android SDK is pulled in automatically via autolinking. The AAR is declared as a dependency of this package and resolved from its Maven repository at build time. There are no manual steps: no MainApplication edits, no manifest meta-data, and no project ID in Gradle.
If Android dependency resolution fails because your app uses Gradle’s centralized dependencyResolutionManagement with RepositoriesMode.FAIL_ON_PROJECT_REPOS, add the Klaritics Maven repo to android/settings.gradle:
android/settings.gradle

iOS setup

iOS is zero-config. Just install the pods:
React Native autolinking picks up this package’s podspec, which fetches the prebuilt Klaritics core framework (xcframework) and wires up the headers, linking, and embedding for you. There are no Xcode steps, no Podfile edits, and nothing to add manually. No AppDelegate code is required; initialization happens entirely from JavaScript.

Initialize the SDK

The Project ID and Host are provided at runtime in JavaScript. You do not put them in AndroidManifest.xml, Info.plist, or Gradle. The apiKey prop takes your project_id value.

KlariticsProvider

Wrap your app near the root. The SDK initializes on both platforms when the provider mounts.
App.js

KlariticsProvider props

API reference

Imports

All attribute objects are automatically pruned before being sent. null, undefined, NaN, Infinity, and empty nested objects are stripped out.

Common recipes

Identify a user

Set user and session properties

Log an event

Track a screen and get the device ID

Troubleshooting

Next steps

Verify your integration

Send test events from your app and watch them land on the Getting Started page.

Release notes

What changed in each React Native SDK version.

Package: @deeptaai/klaritics-react-native-sdk · Version: 1.0.0 · License: MIT · Release notes