Requirements
Before integrating the AppDNA React Native SDK, ensure your project meets the following minimum requirements:| Requirement | Minimum Version |
|---|---|
| React Native | 0.72.0+ |
| React | 18.0+ |
| TypeScript | 5.0+ |
Installation
npm
yarn
Package Info
| Field | Value |
|---|---|
| Package | @appdna/react-native-sdk |
| Version | 1.0.0 |
Architecture
The@appdna/react-native-sdk package is a TypeScript thin wrapper around the native iOS and Android AppDNA SDKs. All core logic — event batching, config caching, billing, push handling — is delegated to the native modules via React Native’s NativeModules bridge.
The package has no runtime JavaScript dependencies. The Dart-level API marshals method calls down to the native side and surfaces results back as Promises and event listeners.
You do not need to interact with
NativeModules directly. The AppDNA class and its module accessors provide a high-level TypeScript API that wraps all native communication.iOS Setup
After installing the npm package, install the native CocoaPods dependency:If
pod install fails, make sure your CocoaPods repo is up to date by running pod repo update first.Android Setup
No additional setup is needed for Android. The native module is auto-linked by React Native when you install the package.Import
Import the SDK in any TypeScript or JavaScript file where you need to use it:Verify Installation
After adding the dependency, verify the SDK is correctly installed by printing the version:You should see
1.0.0 printed in the Metro console. If the import fails, make sure you ran pod install for iOS and rebuilt the app. For Android, a clean rebuild (cd android && ./gradlew clean) may be needed.