Skip to main content
Supported on: iOS SDK 1.0.61+
The remote config module delivers key-value pairs from the AppDNA Console to your app. Values are set in the Console and synced to the SDK automatically. All reads are synchronous from an in-memory cache — they never block the UI thread or require a network call.

Get Config Values

Read values using the get method. Returns Any? — you cast to the expected type on your side.
To retrieve all config values at once:

Module Access

Module Methods

When Config Refreshes

The SDK refreshes remote config automatically:
  • At configure — once the bootstrap succeeds, the SDK fetches the config, whatever the cache’s age. If the bootstrap failed (for example, offline at launch), the fetch runs when a retry of the bootstrap succeeds — the SDK retries it when the network comes back, on foreground and after a backoff (Offline-first). A fetch that returns nothing (offline) is retried up to five times, after 2, 4, 8, 16 and 30 seconds
  • When the TTL elapses — after each successful fetch the SDK schedules another one for when the config is older than the TTL (default 1 hour)
The SDK does not fetch on return from the background and runs no background fetch; it does not listen for Console changes in real time. You can also force a refresh with AppDNA.remoteConfig.refresh() or AppDNA.forceRefreshConfig(), which bypass the TTL. If the fetch fails (no connectivity, timeout), the SDK continues using the cached values. On first launch with no connectivity, bundled config defaults are used.
The config TTL is configurable via AppDNAOptions(configTTL: 7200) (in seconds). When you do not set it, the value the server returns with the SDK’s bootstrap request applies once the bootstrap succeeds, if it is positive; otherwise 3600 seconds (1 hour).

Listen for Config Changes

Register a closure that is called on the main thread once after every successful config fetch (at configure, when the TTL expires, on refresh()), whether or not a value changed:

Full Example

Remote config values are managed in the Console under Settings → SDK → Config Bundle, in the Remote Config card (Add Flag, then Save & Sync). Changes take effect on the next SDK config refresh (within the TTL window).