Choose Your Platform
iOS
Native Swift SDK distributed via Swift Package Manager and CocoaPods. Requires iOS 16.0+ and Swift 5.9+.
Android
Kotlin SDK distributed via Maven Central (Gradle). Requires Android API 24+ and Kotlin 1.9+.
Flutter
Dart package distributed via pub.dev. Requires Flutter 3.10+ and Dart 3.0+.
React Native
TypeScript package distributed via npm. Requires React Native 0.76.9+ with the New Architecture enabled (RN 0.77+/Kotlin 2.0 supported via a version-gated Compose config).
Platform Comparison
Requirements
The React Native SDK requires the New Architecture. All four SDKs are generally available.
iOS 1.0.77 adds a case to the public
AppDNAInitError enum. If you switch over it
exhaustively your build needs one extra case — see
iOS Installation. No other API changed, and nothing changes at runtime.Dependencies
Flutter and React Native SDKs bridge to the native iOS and Android implementations under the hood. You do not need to add native dependencies manually — they are bundled with the SDK.
Core API
Every SDK exposes the same five core methods. The API is intentionally minimal — initialize once, identify your user, track events, and the SDK handles the rest.configure
Initialize the SDK with your API key. Call this exactly once at app startup.
- iOS
- Android
- Flutter
- React Native
identify
Link a user identity with optional traits. Traits are merged with previously set values.
- iOS
- Android
- Flutter
- React Native
track
Record a custom event with optional properties. Events are queued locally and flushed automatically.
- iOS
- Android
- Flutter
- React Native
reset
Clear the user identity on sign-out. The anonymous ID is preserved so device-level analytics continue uninterrupted.
- iOS
- Android
- Flutter
- React Native
flush
Force-send all queued events immediately. Useful before the app enters the background.
- iOS
- Android
- Flutter
- React Native
Module Namespaces
Beyond the core API, the SDK organizes features into 10 module namespaces. Each namespace is accessed as a property on theAppDNA singleton and operates independently while sharing the core event pipeline, identity state, and configuration layer.
Every namespace is available on all four SDKs. Flutter and React Native are thin wrappers over the same native iOS and Android renderers, so the module surface is the same one — not a re-implementation of it.
Delegate and Callback Protocols
Each module that communicates events back to your application uses a delegate or callback pattern. The core delegate protocols shared across all platforms include:- iOS
- Android
- Flutter
- React Native
Implement Swift protocols with default empty methods. Conform to only what you need:
Architecture
Offline-First Design
All four SDKs share the same offline-first architecture. Your app never crashes or degrades because of a network issue. Configuration priority — the SDK resolves config using a three-tier fallback:
Events survive app restarts and device reboots. They are removed from the queue after a successful upload, or dropped when the server rejects the batch with a 4xx other than 408 / 429, when they are older than 7 days, when the queue passes 10,000 events or 5 MB, or when analytics consent is revoked. See Offline-First Architecture.
Experiment Bucketing
All SDKs assign variants on the device with the same MurmurHash3 (32-bit) hash:userId is the identified user ID, or the anonymous ID before identify(). The same ID gets the same variant for the same experiment on every platform and in every session, with no server round-trip, as long as the user passes the experiment’s targeting rules and traffic allocation. See Experiments.
Config Bundle for CI/CD
The server regenerates the config bundle shortly after each publish (usually within about 20 seconds; Regenerate under Settings → SDK → Config Bundle builds one at once). Download it at build time as in Config Bundles in CI/CD, and embed it in your app binary so that a first launch without network has config. The native SDK reads the file:- iOS
- Android
- Flutter
- React Native
Add
appdna-config.json to your Xcode project as a bundle resource.Feature Parity Matrix
All four SDKs have feature parity. Flutter and React Native wrap the native iOS and Android SDKs — the rendering, business logic, storage, and network I/O are the same code paths, reached through a thin facade.Configuration Options
All SDKs accept the same configuration options at initialization:iOS only: the Info.plist keys
AppDNADisableNotificationProxy (Boolean — turns off the launch-time notification delegate proxy) and AppDNAForegroundPresentation (array of banner, list, sound, badge — how AppDNA pushes are presented in the foreground) are read from your app’s Info.plist, not passed as runtime options. See the iOS Push page.Use
logLevel: debug during development and logLevel: warning or logLevel: none for production builds.Environments
Events, experiments, and configuration are completely isolated between environments. The SDK auto-detects the environment from your API key prefix.
Two key families exist and the server accepts both:
adn_live_ / adn_test_ (Settings → SDK → API Keys) and pk_live_ / pk_sandbox_ (issued by the app-setup wizard and listed under Settings → SDK Keys, /settings/sdk-keys). Use an adn_ key for the SDK. A pk_ key works, but the native iOS and Android SDKs log “API key format invalid” at configure, and on iOS diagnose() also reports “invalid format” for it (Android’s diagnose() does not check the key format).Next Steps
iOS Installation
Add AppDNA to your Xcode project via SPM or CocoaPods.
Android Installation
Add AppDNA to your Gradle build.
Flutter Installation
Add the appdna_sdk package from pub.dev.
React Native Installation
Install @appdna-ai/react-native-sdk from npm.

