Search code examples
firebasefirebase-remote-config

App Version in Firebase Remote Config Condition


I'm using Firebase for my iOS app. For users on old versions of my app I want to be able to force them to update their app from App Store to be able to continue using the app. For this I'm checking a remote config value in the app if it's true the user will get a full screen message to update. In Firebase Console Remote Config I'm checking the version of the app to set the remote config value to true/false. See image below.

The problem is that I want to be able to use "where version < X" to set the value or if that is not possible at least be able to pick more than one version (where version is X or Y or Z).

This must be a common use case but I can't figure out how to do this. Anyone know how to? Can I use regex, but how?

Remote config in Firebase Console


Solution

  • Add a remote config value that declares the minimum required version like this

    enter image description here

    Then you implement the "is old" logic on client side by checking the client's version number against the provided remote config value. If the check fails, then you display the "update your app" screen.

    Make sure to set the default/fallback value on the client to a version number that is not forcing them to update (version 0.0.0 for example).

    You can configure remote config conditions for different platforms and version number values if you don't have a synchronized version numbering across your platforms.