The React Native SDK requires the New Architecture.
Supported on: iOS SDK
1.0.70+ · Android SDK 1.0.42+ · React Native SDK 1.0.7+ (New Architecture only)Requirements
Before integrating the AppDNA React Native SDK, ensure your project meets the following minimum requirements:
Bare React Native: set
newArchEnabled=true in android/gradle.properties, and run the iOS
pod install with RCT_NEW_ARCH_ENABLED=1.
Expo: the config plugin does both for you — it writes newArchEnabled=true into
android/gradle.properties and into ios/Podfile.properties.json, which is where Expo’s Podfile
reads it from to set RCT_NEW_ARCH_ENABLED.
Installation
Install the AppDNA SDK package:Bare RN, iOS: register the screen slot when your Podfile uses use_frameworks!
Expo apps can skip this section — the config plugin writes this override into the AppDelegate on
every prebuild. It applies to bare React Native only.
Skip it too if your app links pods as static libraries — nothing to do there. But if your Podfile
has use_frameworks! (which any app with Firebase in its pod graph ends up needing, and the AppDNA
core SDK depends on Firebase), you must hand the screen-slot view to React yourself.
React Native’s generated component registry wraps its whole third-party component map in
#ifndef RCT_DYNAMIC_FRAMEWORKS, so with dynamic frameworks nothing registers AppdnaScreenSlotView.
There is no error and no warning — <AppDNAScreenSlot> simply renders React’s placeholder,
Unimplemented component: <AppdnaScreenSlotView>, and the slot never appears.
Add the override below to AppDelegate.mm. RCTAppDelegate already exposes the hook:
<AppDNAScreenSlot> component needs it.
Expo
The package ships a config plugin. Add it toapp.json and run a prebuild:
Options — all optional:
Autolinking wires the native iOS and Android modules automatically — no manual linking step is required.
Firebase Configuration
The AppDNA SDK uses Firebase Firestore for real-time configuration delivery (paywalls, experiments, feature flags, onboarding flows). You must add Firebase configuration files for each platform your app targets.Step 1: Download Firebase Config Files
- Log into your AppDNA Console
- Go to Settings → SDK
- Click Download Firebase Config to download both:
GoogleService-Info-AppDNA.plist(for iOS)google-services-appdna.json(for Android)
Step 2: Add iOS Configuration
- Open
ios/<YourApp>.xcworkspacein Xcode - Drag
GoogleService-Info-AppDNA.plistinto your app target’s folder in the project navigator - Ensure “Copy items if needed” is checked
- Select your app target in the “Add to targets” section
Step 3: Add Android Configuration
Place thegoogle-services-appdna.json file in the Android app module directory:
android/app/build.gradle:
android/build.gradle:
If your app already uses Firebase for your own services (Realtime Database, Analytics, Crashlytics), AppDNA automatically initializes a separate named Firebase instance using
GoogleService-Info-AppDNA.plist (iOS) and google-services-appdna.json (Android). Your existing Firebase setup is not affected. Just add the AppDNA config files alongside your own.Architecture
The@appdna-ai/react-native-sdk package is a thin TypeScript facade over a TurboModule. Rendering,
storage, and network I/O all happen in the native iOS and Android SDKs; the facade marshals method
calls and receives native callbacks.
Method calls resolve through TurboModuleRegistry, and native events arrive on the generated event
emitters — not through NativeEventEmitter, which under the New Architecture would subscribe to a
channel nothing writes to.
Callbacks that native waits for
Most callbacks are one-way notifications. Eight are vetoes: native pauses and waits for your answer before it proceeds.
Each may return a value or a
Promise of one, so a handler can ask your own backend. If it takes
longer than the veto timeout (5 seconds by default, vetoTimeout in configure), native applies the
default in the last column and moves on. onPromoCodeSubmit is the one hook whose default is to
refuse — a timeout means the code was never validated.
You never interact with the bridge directly. The
AppDNA class and its module accessors provide a
high-level TypeScript API.Native Dependencies
The React Native SDK inherits the dependencies of the underlying native SDKs. These are resolved automatically by CocoaPods (iOS) and Gradle (Android):If your project already includes these dependencies, ensure your version constraints are compatible with the versions above. CocoaPods and Gradle will resolve conflicts automatically in most cases.
Lottie and Rive animation support is provided by the native SDKs. On iOS, add
lottie-ios and rive-ios to your Podfile if you use those formats. On Android, the equivalent dependencies are bundled with the native AppDNA SDK.Import
Import the SDK in any TypeScript / JavaScript file where you need to use it:AppDNA static class, every module accessor, the canonical delegate interfaces (AppDNAPushDelegate, AppDNAPaywallDelegate, AppDNAOnboardingDelegate, etc.), and all DTOs (Entitlement, ProductInfo, TransactionInfo, PaywallContext, …).
Verify Installation
After adding the dependency, verify the SDK is correctly installed by printing the version:You should see a version string. If the call throws instead, the error names the exact cause: Expo Go,
a missing
pod install, an unsupported runtime, or the New Architecture being switched off.Troubleshooting
If you encounter issues during integration, callAppDNA.diagnose() after configuration to get a full health report:
For more verbose output, set
logLevel: 'debug' in AppDNAOptions during development to surface SDK activity.

