Supported on: iOS SDK
1.0.70+ · Android SDK 1.0.42+ · React Native SDK 1.0.7+ (New Architecture only)@appdna-ai/react-native-sdk package. The React Native SDK delegates rendering, business logic, and
storage to the native iOS and Android layers, so every method here resolves to native execution.
Every signature on this page is compiled against the package’s published type declarations in CI — if
a signature here disagrees with the code you install, the build fails.
Core Methods
All core methods are static on theAppDNA class.
Config Methods
Session Data
Cross-module key-value bag used by Console-configured template interpolation ({{session.*}}).
null:
What is filled depends on what the user did. Both platforms and both surfaces — a Location field on a
form step and a Location content block — store the same shape.
A coordinate that is not a finite number comes back
null. A zone the lookup could not find leaves timezone and timezone_offset both null — on every platform and surface; the SDK never makes up a "UTC". Always null-check before using a field.
Experiments
Push (static helpers)
These mirrorAppDNA.push.* — use either style.
Presentation
Web Entitlements
Deep Links
Module Namespaces
setDelegate accepts a delegate or null. The parameter is nullable on every module: passing
null clears the delegate — its listeners are removed and no callback fires afterward.
Registering a new delegate replaces the previous one, so register once at app startup rather than
from a component that mounts and unmounts. shutdown() detaches everything.AppDNA.push
AppDNA.billing
AppDNA.onboarding
AppDNA.paywall
AppDNA.remoteConfig
AppDNA.features
AppDNA.experiments
AppDNA.inAppMessages
AppDNA.surveys
AppDNA.deepLinks
AppDNA.screens
To embed a screen inline in your own React layout instead of presenting it over the app, use
<AppDNAScreenSlot>.
AppDNA.lifecycle
Delegate Interfaces
Implement these and register them with the matching module’ssetDelegate(...).
AppDNAOnboardingDelegate
AppDNAPaywallDelegate
errorType values
onPaywallPurchaseFailed always carries one of these, so you can decide whether a retry even makes
sense without parsing a message:
AppDNAPushDelegate
AppDNABillingDelegate
AppDNAInAppMessageDelegate
AppDNASurveyDelegate
AppDNADeepLinkDelegate
AppDNAScreenDelegate
AppDNALifecycleDelegate
Components
AppDNAScreenSlot
The package’s only React component: it embeds a server-driven screen inline in your layout. See the Screens guide.Key Types
AppDNAEnvironment
There is no
'staging'. Which backend data you touch is decided by the API-key prefix
(adn_test_ for a test key, adn_live_ for a live one); this value only tags the SDK’s own
environment. Pass 'sandbox' alongside an adn_test_ key for a test build.AppDNAOptions
AppDNALogLevel
AppDNABillingProvider
StepAdvanceResult
The plain object you return fromonBeforeStepAdvance. The hook’s TypeScript return type is
Promise<Record<string, unknown>> — native decodes the type discriminator:
StepConfigOverride
The plain object you return fromonBeforeStepRender (or null to render the step unchanged):
PaywallContext
PaywallAction
Theaction string passed to onPaywallAction:
PushPayload
The notification map, with the keys native actually sends — snake_case:PushAction
One structured notification action button.id echoes back as onPushTapped’s actionId.
Entitlement
The union of what the two platforms know. A key that the running platform has no concept of is omitted, never faked — so the platform-specific fields are optional, and an absent one means “this platform does not know”, notfalse or "".
Ask isActive. It is the cross-platform question: both platforms send it, and on Android it is
derived from the Play status so you never have to learn that vocabulary.
TransactionInfo
What a successfulpurchase(...) resolves with. There is no status field: a resolved promise is
the purchase. A cancellation, a pending (deferred / ask-to-buy) purchase, and a store error all
reject — catch them, do not test a status.
ProductInfo
Platform-specific keys are omitted, never faked: an absent key means the platform has no concept of it.There is no numeric
price field. iOS’s native price is a Decimal, which cannot cross the bridge
without loss, so both platforms send integer priceMicros. Render displayPrice (already localized
and currency-formatted), or divide priceMicros by 1,000,000 when you need the number.WebEntitlement
DeferredDeepLink
Notes
Architecture
The React Native package exposes API facades, DTOs, and bridge calls; rendering, business logic, network I/O, and storage execute in the native iOS (Swift) and Android (Kotlin) SDKs. The delegate interfaces and the native module spec are generated from the same source as the iOS and Android surfaces, so the TypeScript API cannot silently drift from them.Platform-specific behavior
billingProviderapplies on both platforms ('storeKit2'= StoreKit 2 on iOS, Google Play Billing on Android). Under'revenueCat', Adapty or'none'the SDK never buys, restores, finishes or acknowledges; purchase and restore reject withproviderNotAvailable.requestPermission()onAppDNA.pushtriggers the iOS APNs prompt or the Android 13+POST_NOTIFICATIONSruntime permission.shutdown()flushes queued events and releases native resources on both platforms, and the wrapper additionally detaches every delegate, veto handler, and cached snapshot.offerTokenonpurchase(...)selects an Android base-plan offer and is ignored on iOS.onBillingUnavailablefires on Android only.notificationIconapplies on Android only.

