@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 link, no MainApplication edits, and no settings.gradle changes required.
- Android: ready after install. See Android setup.
- iOS: run
pod install. See iOS setup.
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: noMainApplication 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: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 inAndroidManifest.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