Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 304
Martin Avatar asked Oct 17 '19 09:10

Martin


People also ask

What is Firebase remote config?

Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update. When using Remote Config, you create in-app default values that control the behavior and appearance of your app.

How do I change Firebase version?

firebase -V So you can basically run npm i -g firebase-tools to update the version of your firebase-tools installation to the latest version.

How do I get Firebase remote configuration data?

Or using Firebase Assistant, just click on the text: “Set Up Remote Config” and the above-mentioned library will be automatically added. Add the parameters in Firebase Console.

What file should be used for your remote config template?

When using this feature, we recommend configuring default values for all parameters in the Firebase console. Use XML , PLIST , or JSON as the format value, depending on which file format you want to download.


1 Answers

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.

like image 157
Dennis Alund Avatar answered Oct 01 '22 13:10

Dennis Alund