Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Remote Config App Version condition

The Firebase Remote Config App version condition seems to be ignored. I've made the following setup to play around with my current development version:

xCode Version setup: enter image description here

Firebase Remote Config Condition setup: enter image description here

FIRRemoteConfig won't return the right paramater values.

like image 372
stsandro Avatar asked Jul 11 '16 11:07

stsandro


Video Answer


2 Answers

Its known bug - instead of version value FB uses the build value. The only possible workaround - to put the same value to build. So in your case it should be like "version: 1.1.8" and "build: 1.1.8". Or you could use the build value and keep the value updated with every app release.

like image 137
Stan Avatar answered Oct 04 '22 03:10

Stan


Another option is you can add a "User Property" in Firebase like "app_version". Then when the app launches add the following code:

let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String Analytics.setUserProperty(version, forName: "app_version")

You can then use this User Property in Remote Config as a condition and voila you can base some Remote Config value of of the version number. Note this will require the use of Firebase Analytics as well.

Adding user property Firebase

like image 44
SchmidtyApps Avatar answered Oct 04 '22 01:10

SchmidtyApps