As your app evolves, new releases can introduce breaking changes to backend APIs, resolve critical security vulnerabilities, or replace deprecated services and AI models. In these situations, earlier app versions can stop functioning reliably or securely.
Using Remote Config, you can control app version requirements dynamically from the cloud. By defining version parameters in Remote Config, you can prompt or require users to update their app without deploying custom server infrastructure or releasing an emergency update.
Choose an update strategy
Remote Config supplies the version parameters to evaluate on the client, letting you configure your app's update UI for either of two strategies depending on the severity of the change:
- Forced (blocking) update: If an earlier app version is incompatible with your backend or poses a security risk, you can block access to the app until the user updates. When the installed version is earlier than the required minimum, you can configure your app to display a non-dismissible dialog that directs the user to the platform app store to install the latest version.
- Flexible (optional) update: If an update introduces new features, performance improvements, or minor bug fixes, you can configure your app to display a dismissible banner or prompt encouraging users to update at their convenience while letting them continue using the app.
Step 1: Configure parameters in Firebase console
To manage app versions, define parameters in your Remote Config template:
- In the Firebase console, go to the DevOps & Engagement > Remote Config > Parameters page.
- Click Add parameter (or Create configuration if this is your first parameter).
- Define the following parameters:
minimum_version: A string representing the earliest supported version of your app (for example,"2.4.0"). Apps running a version earlier than this value are blocked until updated.latest_version(optional): A string representing the latest available version of your app (for example,"2.5.1"). Apps running a version betweenminimum_versionandlatest_versioncan show an optional update recommendation.update_url(optional): The store URL where users can download the update (such as your Google Play Store or Apple App Store listing).
- Optional: Add platform-specific conditions:
- Because Android and Apple apps often use different release versions and store URLs, you can add conditional values for each platform under the same parameter.
- Click Add value for condition > Create condition. Name the
condition (such as
Android ApporiOS App), select App as the targeting rule, and choose your app. - Set the appropriate version string for each platform condition, and keep the default value as a fallback.
- Click Save and then click Publish changes to apply the template.
Step 2: Implement client-side version checks
On the client, check the installed app version against the Remote Config parameters during startup:
- Set in-app default values: Always provide safe in-app default values in
your app bundle (for example, set
minimum_versionto your initial app release, such as"1.0.0"). This fallback configuration ensures that your app continues to operate normally if the device is offline or the initial fetch request fails. For platform-specific guidance, see Download Remote Config template defaults. - Fetch and activate Remote Config: Fetch and activate the latest template values when your app starts.
Compare versions: Retrieve the active
minimum_versionandlatest_versionstrings and compare them with the currently installed app version.Take action based on the version comparison:
- Enforce required update: If
current_versionis earlier thanminimum_version, display a full-screen, non-dismissible modal alert. Disable navigation to the rest of the app and provide a button that opens theupdate_urlin the platform app store. - Prompt optional update: If
current_versionis earlier thanlatest_version, display a dismissible dialog or notification letting users know that an update is available, with options to Update now or Later. - Allow access: Otherwise, allow the user to proceed into the app.
- Enforce required update: If
Best practices
- Add a real-time listener: When version updates are required because of security issues or serious UX degradation, adding a real-time Remote Config listener to your app can help ensure that version requirement changes take effect immediately on active devices without waiting for the next scheduled fetch or app restart.
- Test with a limited testing group: Before raising the
minimum_versionfor all production users, test the condition with a limited testing group or target internal testers by using custom user properties. This testing verifies that the blocking modal displays correctly and that the store links resolve properly. - Use platform in-app update APIs: On Android, consider integrating Google Play In-App Updates alongside your Remote Config checks to let users download and install updates without leaving your app.
- Read production checklists: Read the Firebase launch checklist and AI Logic production checklist for more guidance on preparing your app and AI features for production.