Skip to main content
Supported on: iOS SDK 1.0.70+ · Android SDK 1.0.42+ · React Native SDK 1.0.7+ (New Architecture only)
The remote config module delivers key-value pairs from the AppDNA Console to your app. Reads are served from an in-memory cache populated at SDK launch, so they return quickly without a network round trip.

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.
Call them like this:

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
If the fetch fails, the SDK continues using cached values. On first launch with no connectivity, bundled config defaults are used.
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-render await AppDNA.remoteConfig.get(...) pays a bridge hop every render. Prime a snapshot once after configure() and read it synchronously afterwards:
The snapshot refreshes itself whenever native applies new config. It is a read-through cache over native, not a source of truth — 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.