LaunchDarkly is a feature flag management platform that allows mobile app developers to enable and disable features without redeploying. According to LaunchDarkly, 2024, over 4,000 companies use the service for safe feature releases, A/B testing, and gradual rollout in real time.
Key Takeaways
LaunchDarkly is a feature flag management platform founded in 2014 by Catamorphic Corp. The main purpose of the service is to give development teams the ability to enable, disable, and configure application features in real time without deploying new code.
Unlike the traditional approach where releasing new functionality requires publishing a version in the app store, LaunchDarkly allows changing behavior remotely. For mobile development, this is especially important — App Store and Google Play reviews take from several hours to a day, while a flag can be toggled in seconds.
The LaunchDarkly architecture consists of three components: the flag server, client SDKs, and the dashboard. The server stores flag configurations, targeting rules, and user segments. The SDK maintains a persistent SSE connection to the server for receiving real-time updates.
When a flag is changed in the dashboard, the server sends an update to all connected SDKs. The delay is 200–500 milliseconds. When the connection is lost, the SDK uses the last cached state until the channel is restored. This ensures the application continues working with the most recent settings available at the time of disconnection.
The LaunchDarkly dashboard provides a visual interface for creating and managing flags. The dashboard shows the current state of each flag, change history with audit logs of who modified the configuration and when, as well as usage metrics. Separate rules can be configured for each environment — a flag can be 100% enabled on staging and 5% on production.
Feature flag is a named toggle with rules and targets. Flags can be boolean, multivariate, and JSON. Rules define activation conditions: for example, “enable for 10% of Android 12 users from Germany.” Segments group users by OS version, region, device model, and custom attributes.
Each flag has environments: development, staging, and production. This allows testing a new feature in an isolated environment before enabling it for real users. Environment rules are configured independently — a flag can be enabled on staging and disabled on production.
LaunchDarkly provides native SDKs for Android, iOS, React Native, and Flutter. Each SDK requires minimal setup: an SDK key and a user identifier. The library automatically manages connections, caching, and error handling.
To connect, create an LDClient instance in Application.onCreate. The client accepts a configuration with a mobile key and user context. After initialization, the application calls a flag variation anywhere in the code using the boolVariation method.
class MyApplication : Application() {
private lateinit var ldClient: LDClient
override fun onCreate() {
super.onCreate()
val config = LDConfig.Builder("mobile-key-abc123")
.build()
val user = LDUser.Builder("user-unique-id")
.build()
ldClient = LDClient.init(this, config, user)
}
}
After initialization, checking a flag is done with a single method. BoolVariation returns the value according to the flag rules. The default value is used if the SDK could not retrieve the configuration. The boolVariationDetail method additionally returns the reason why the flag took that value.
val ldClient = LDClient.get()
val showNewFeature = ldClient.boolVariation(
"new-checkout-flow",
false
)
if (showNewFeature) {
showNewCheckoutScreen()
} else {
showLegacyCheckoutScreen()
}
A/B testing in LaunchDarkly is implemented through multivariate flags. Each variant is assigned a traffic percentage — for example, 50% of users see the old screen (variant A) and 50% see the new one (variant B). The platform pins the user, ensuring they always land in the same group.
Gradual rollout increases the percentage of users who have access to a feature incrementally. A typical schedule: 1% — first day, 5% — second, 25% — third, 100% — after a week. If an error is detected, the flag is instantly turned off for everyone. LaunchDarkly integrates with Amplitude, Mixpanel, and Google Analytics for tracking metrics of each variation.
The platform provides a built-in experimentation system that automatically calculates the statistical significance of differences between variants. Available metrics: conversion, retention, session count, errors, and custom events. Results are displayed in the dashboard with confidence interval visualizations. Experiments can be run on production traffic as well as on dedicated user segments.
Integration of LaunchDarkly with analytics platforms is another advantage. Flag data is automatically sent to Amplitude, Mixpanel, Google Analytics, or a custom data pipeline through the Data Export API. This allows building reports on how each feature impacts key application metrics. LaunchDarkly also supports webhooks for notifying external systems about flag state changes.
Let’s walk through the full cycle: adding the dependency, initialization, and checking a flag for crash telemetry. The feature should only be active for testers, not real users. The LaunchDarkly SDK for Android is available through Maven Central. Version 5.x supports Kotlin Coroutines and Jetpack Compose for reactive flag update delivery.
For iOS applications, LaunchDarkly provides Swift Package Manager and CocoaPods support. The Swift SDK uses async/await for asynchronous initialization and the Combine framework for subscribing to changes. Both SDKs (Android and iOS) support background synchronization and caching in local storage for offline operation.
// app/build.gradle
dependencies {
implementation "com.launchdarkly:launchdarkly-android-sdk:5.2.0"
}
In the CrashReporter class, we check the crash-reporting-enabled flag. If the flag is enabled for the current user, we start sending crash reports. The SDK will automatically receive the new state when it changes on the server, but a single check is sufficient for initialization.
class CrashReporter {
fun init() {
val client = LDClient.get()
if (client.boolVariation("crash-reporting-enabled", false)) {
Crashlytics.start()
}
}
}
Successful scenarios: managing payment flow with instant disabling when provider failures occur, gradual rollout of UI changes with metric monitoring, content personalization by segments. According to the official LaunchDarkly blog, teams reduce error recovery time from hours to minutes.
Anti-patterns: using flags for permanent conditional logic (flags are temporary), storing secrets in flag attributes, creating overlapping rules. Recommendation: remove the flag from code after rollout completion — this prevents technical debt and codebase complexity. Another common mistake is using flags for long-lived toggles that are never removed from code after the feature stabilizes.
A proper flag management strategy includes a removal plan for every new flag. LaunchDarkly provides built-in tools for detecting unused flags — a flag is considered unused if the SDK has not checked its value for more than 30 days. Such flags are marked in the dashboard and can be safely removed from code.
For small projects with a single team, LaunchDarkly may be overkill — a simple conditional in code or Firebase Remote Config may suffice. Choose the platform when you need complex segmentation, change auditing, A/B experiments, or multi-team flag management. For startups and MVP projects, LaunchDarkly offers a free Starter plan with limits on the number of flags and MAU.
Compatibility of LaunchDarkly with existing tools is an important selection criterion. The platform integrates with Jira, Slack, PagerDuty, Datadog, and other services via webhooks and APIs. Teams already using these tools get seamless integration without additional infrastructure for monitoring and alerts when flag states change. LaunchDarkly also supports a Terraform provider for managing flags as code (Flags as Code) — this allows storing flag configuration in Git and undergoing code review before applying changes.
Frequently Asked Questions
LaunchDarkly offers a Freemium plan with limits on the number of flags and MAU. Commercial plans for teams start at $150 per month, including unlimited flags, change auditing, and integration with Jira and Slack.
The platform supports over 40 SDKs, including native Android (Kotlin/Java), iOS (Swift/Objective-C), React Native, and Flutter. All mobile SDKs work via the Streaming API with caching in local storage.
Yes, LaunchDarkly has a built-in experimentation system with multivariate flags, traffic distribution, and automatic statistical significance calculation. Integration with Amplitude, Mixpanel, and Google Analytics is supported.
When the connection is lost, the SDK uses cached flag values from local storage. After the connection is restored, the SDK synchronizes with the server and applies the current flag states.
LaunchDarkly provides A/B testing, multivariate flags, advanced segmentation, change auditing, and SDKs for server-side languages. Firebase Remote Config is simpler and free, but does not support multivariate experiments or detailed auditing.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.
Read also