Supported on: iOS SDK
1.0.61+Get Config Values
Read values using theget method. Returns Any? — you cast to the expected type on your side.
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)
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 (atconfigure, 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).

