App Version in Firebase Remote Config Condition
Asked Answered
D

1

7

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

Disproof answered 17/10, 2019 at 9:36 Comment(1)
can you show the full implementation of how you did this please ?Psilocybin
P
8

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.

Pulsimeter answered 6/11, 2019 at 14:11 Comment(3)
In order to "implement the "is old" logic on client-side" and get it to the client, OP will have to force his users to update the app anyways right? Which seems sort of counterproductive?Hahnemann
This can, of course, be helpful for others trying to implement this(for which you get an upvote :) ). But doesn't really solve the OPs problem.Hahnemann
I think I will go with this solution as it seems much easier to implement compared to my original setup. Thanks!Disproof

© 2022 - 2024 — McMap. All rights reserved.