Supported on: iOS SDK
1.0.61+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 — soisEnabled() 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.
Module Access
Module Methods
Using Flags with Experiments
Feature flags and experiments work together. A common pattern is to gate a feature behind a flag, then run an experiment to test its impact:Listen for Flag Changes
Register a closure that is called on the main thread once after every successful config fetch — atconfigure, when the config TTL expires, and on AppDNA.remoteConfig.refresh() — whether or not a flag changed. Re-read the flags you care about:
Full Example
Feature flags are managed in the Console under Settings > Feature Flags. Toggle a flag on or off and it takes effect on the next SDK config refresh — when the TTL elapses (default 1 hour), or immediately if you call
AppDNA.remoteConfig.refresh() / AppDNA.forceRefreshConfig(), which bypass the TTL. iOS runs no background fetch, so without one of those calls the TTL is the whole story.
