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 feature flags module lets you enable or disable features remotely from the AppDNA Console. Flags are evaluated locally from cached config — no network call, no latency on the hot path.

Check a Flag

isEnabled() returns false by default if the flag does not exist or config has not loaded.

What counts as enabled

A flag’s stored value is not always a boolean — the server treats a string-typed flag as first-class — so isEnabled() coerces, identically on both platforms: Use getVariant() when you need the raw value rather than this coercion — a string flag carrying a variant name, for example, where isEnabled() would answer false for every name that is not one of the four above.

Multi-Variant Flags

For flags that carry a string, number, or JSON payload (rather than a simple on/off), read the value with getVariant:
getVariant returns unknown — cast to the type you configured in the Console.

Module Access

Module Methods

Using Flags with Experiments

Gate a feature behind a flag, then run an experiment to test its impact:

React to Flag Changes

Register an onChanged callback to re-render UI when the SDK receives an updated config from the server:
The callback fires once per refresh, not per flag. Re-read the flags you care about inside the callback.

Full Example

Feature flags are managed in the Console under Settings > Feature Flags. Toggle a flag and it takes effect on the next SDK config refresh — when the TTL elapses (default 1 hour), at Android’s background refresh every 15 minutes, or immediately if you call AppDNA.remoteConfig.refresh(), which bypasses the TTL. iOS runs no background fetch, so there the TTL and that call are the only two.