Feature flags in a mobile app — how to turn off a feature without a new release

You can't roll back a mobile app release, and a fix has to wait for store review. What feature flags and remote config are, how to add kill switches to an existing app, what to watch for in the App Store, and what it costs.

Zespół Mobilesoft· Engineering team· 23 listopada 2026· 9 min czytania

Friday, 4 p.m. A new version of the app with a redesigned checkout reached the stores on Thursday. Since the morning, crashes have been climbing on some Android phones, and support tickets say customers can't pay. The fix is ready in two hours, but then it has to pass store review, and users have to install it. You can pause a staged rollout, but people who already downloaded the new version are stuck with the bug.

If the new checkout had been behind a flag, one click in a dashboard would have been enough: the app goes back to the old checkout within minutes, and you ship the fix calmly on Monday. In this article we describe what feature flags and remote config are, how to add them to an existing app, what to watch out for in the stores, and what it costs.

What feature flags and remote config are

A feature flag is a switch in the code: if the flag is on, the app shows the new feature; if it's off, it shows the old one or nothing. The flag's value isn't hard-coded in the app — it's fetched from a server. Remote config is a broader term: from the server you can change not only switches but also parameters, such as message texts, limits or URLs.

Flags serve different purposes and live for different lengths of time:

Type What it's for How long it lives Example Kill switch Quickly turning off a feature that causes problems Long, sometimes for the feature's whole lifetime Turning off card payments when the provider has an outage Release flag Code ships earlier, the feature is switched on later A few weeks, until full rollout New checkout turned on on the day of a campaign Gradual rollout Feature available to a share of users first A few weeks New home screen for 10%, then 50%, then 100% A/B experiment Comparing two variants with data Duration of the test Two variants of the sign-up screen Operational parameter Changing behaviour without a release Long Minimum supported version, photo size limit, help URL

For maintenance, the first and last rows matter most. A kill switch limits the damage of a bug, and operational parameters let you react to change without waiting for the store. The same mechanism powers a forced update and minimum supported version.

Why this matters more in a mobile app than on a website

On a website, you roll back a bad deployment in minutes, and every user gets the fixed version straight away. In a mobile app:

  • you can't roll back a release — whoever installed the faulty version keeps it until the next update,
  • the fix goes through store review, which usually takes from a few hours to a day, sometimes longer,
  • users update with a delay — a week later, some of them still have the old version,
  • several versions of the app run at once, which we cover in the article on API changes and old app versions.

A staged rollout in Google Play or a phased release in the App Store limits how many people get the bug, but it doesn't help those who already have the new version. A flag works for them too — as long as the mechanism was in the app before the problem appeared.

Tools

Option Advantages Limitations Firebase Remote Config Free, common in apps that already use Firebase; conditions by app version, country, language or percentage of users; connects to Firebase A/B Testing By default, config refreshes at most once every 12 hours; limit of 3,000 parameters and 2,000 conditions per project; weaker change history and access control than dedicated tools Dedicated feature flag tools (e.g. LaunchDarkly, ConfigCat, Unleash, Flagsmith, GrowthBook) Rich targeting rules, change history, roles and change approval; some are open source and can be self-hosted Another service to pay for or maintain, another SDK in the app, user data sent to a third party Your own backend endpoint Full control, no extra SDK, flags can depend on data from your own system You build the dashboard, caching, percentage rollout and change history yourself

In most business apps we take over, Firebase Remote Config or a simple custom endpoint is enough. A dedicated tool makes sense when there are many flags, several teams toggle them, and you need control over who changed what.

Keep the refresh interval in mind from the start. With the default 12-hour interval, a kill switch will reach some users only the next day. Firebase supports real-time updates (on Android from SDK version 21.3.0): the app listens for changes and fetches the new config right after it's published. With your own endpoint, the equivalent is fetching flags every time the app returns to the foreground.

How to add flags to an existing app

  1. Start with two or three kill switches. Not a flag for every feature — only for the places where an outage costs the most: payments, login, third-party integrations, the new feature in the next release. Crash reports and analytics will tell you which places those are.
  2. Decide on a default value built into the app. On first launch without internet, or when the server doesn't respond, the app uses the value from the code or the last one it fetched. For each flag, you have to consciously decide which state is safe.
  3. One access layer for flags. App code asks for a flag through your own simple class, not directly through the vendor's SDK. That makes it easy to switch tools, inject values in tests and see where a flag is used.
  4. Plan what the user sees when a feature is off. A hidden button or a message like "Card payment is temporarily unavailable, please choose another method" — not a blank screen or a network error.
  5. Test both states. Every flag doubles the number of paths in that spot. A kill switch that was never toggled in testing can cause another outage at the critical moment. If the app has few tests, start with these paths — we cover how to approach testing in an old project in a separate article.
  6. Record flag state in crash reports. Crashlytics lets you add custom keys, Sentry has tags. Without this, you can't tell a crash in the new checkout from a crash in the old one.
  7. Decide who can toggle flags. A separate project or environment for testing, restricted access to production, change history. It's worth stating in the maintenance contract who decides to turn off a feature outside working hours.

When extending an existing app, there's one more benefit: the code of a new feature can go into successive releases gradually, hidden behind a flag, instead of waiting months for one big release.

What flags won't solve, and what to watch for in the stores

  • Hidden features and the App Store. Guideline 2.5.19 prohibits hidden, dormant and undocumented features, and 2.3.1 requires new features to be described specifically in the review notes and accessible for review. A release flag is fine if you describe the feature and how to turn it on in the notes. A flag used to switch on something the reviewer wouldn't accept is a short road to having the app rejected and, in extreme cases, to losing the account.
  • Flags don't deliver code. Apple (guideline 2.5.2) and Google Play prohibit downloading executable code that changes the app's features. A flag can only turn on and off code that has passed review.
  • Flags are not a place for secrets. Firebase documentation states plainly that users can access the values fetched by the app. API keys, passwords and permission decisions (e.g. access to paid features) must be checked on the server — more in the article on mobile app security.
  • Older versions don't have the mechanism. Flags work from the version in which they were added. You can only handle users of older versions with a forced update or a change on the backend side.

Dead flags — a new kind of technical debt

In apps we take over, we sometimes find dozens of flags, and nobody knows whether they're on, why they were created or whether they can be removed. The code for both variants stays in the app; one of them hasn't run for a long time, but it still has to be updated and compiled. That's typical technical debt.

A few rules that prevent it:

  • every flag has an owner and a review date recorded next to its definition,
  • a release flag is removed from the code within one or two releases after the feature reaches everyone,
  • kill switches stay longer, but they're listed in the technical documentation together with a description of what happens when they're turned off,
  • once a quarter, review the list of flags in the dashboard and in the code.

How much it costs

Scope Estimated effort At PLN 180 net per hour App review, choosing places for kill switches and the tool 4–8 h approx. PLN 0.7k–1.4k Tool integration, flag access layer and the first 2–3 kill switches 16–32 h approx. PLN 2.9k–5.8k Each additional flag with off-state handling and tests 2–8 h approx. PLN 0.4k–1.4k Real-time updates and flag state in crash reports 4–12 h approx. PLN 0.7k–2.2k Cleaning up existing flags in a taken-over app 8–40 h approx. PLN 1.4k–7.2k

The figures are estimates and depend on the technology, the state of the code and whether the app already has Firebase or a similar tool. The rate is an example — we set the actual cost after reviewing the project. It's worth comparing these amounts with the cost of a few days in which customers can't pay in the app.

Summary

You can't roll back a mobile app release, so flags and remote config are one of the few ways to react to a bug in minutes rather than days. Start with a few kill switches in the riskiest places, with a safe default value, fast refresh and tests of both states. Describe new features in the review notes, keep secrets out of the config and remove flags that have done their job.

We add kill switches and remote config as part of our mobile app maintenance service, and during a mobile app takeover we check which flags are already in the code and which can be removed. If you want to know what state your app is in, order a free app analysis or contact us.