Supported on: iOS SDK
1.0.70+ · Android SDK 1.0.42+ · React Native SDK 1.0.7+ (New Architecture only)Get a Config Value
get returns Promise<unknown> — the value type matches whatever you configured in the Console (string, number, boolean, or JSON object). Cast to the type you expect and supply a fallback for the undefined case.
Reading Other Types
Get All Values
getAll returns a Record<string, unknown> containing every key the SDK currently has cached.
Force a Refresh
refresh pulls the latest config from the server. The SDK already refreshes automatically (see below) — call this explicitly only when you need fresh values right now (e.g. after a user changes their preferences in another tab).
Module Access
Module Methods
Typed Helpers
If you prefer typed accessors at the call site, add a small helper module. This keeps the SDK surface small while giving your codebase a typed feel.When Config Refreshes
The SDK refreshes remote config automatically:- On app launch — if the cached config has expired (default TTL: 1 hour)
- On return from background — same TTL check
The config TTL is configurable via
AppDNAOptions { configTTL: 7200 } (in seconds). The default is 3600 seconds (1 hour).Listen for Config Changes
onChanged fires once per refresh whenever the SDK receives updated config from the server. Re-read the keys you care about inside the callback. Returns an unsubscribe function.
Synchronous reads on the hot path
A per-renderawait AppDNA.remoteConfig.get(...) pays a bridge hop every render. Prime a snapshot
once after configure() and read it synchronously afterwards:
getCached returns undefined before primeSnapshot() has run.
Full Example
Remote config values are managed in the Console under Settings > Remote Config. Changes take effect on the next SDK config refresh.

