Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reset activated remote config values

Using Firebase, after I fetch and activate my remote config values, calling configValue(forKey key: String?) will give me the value from the remote source. I know I can call func configValue(forKey key: String?, source: RemoteConfigSource) or defaultValue(forKey key: String?) to get the default value. But, how do I reset my activated data so that calling configValue will give me the default values again?

Further, do the activated values persisted ever get purged?

like image 464
Michael Ozeryansky Avatar asked Mar 04 '23 15:03

Michael Ozeryansky


1 Answers

Firebaser here with some additional info that could be helpful.

The Android SDK does have a reset method as of the v2 release that can do what you're looking for here. The reset() call will reset Remote Config to the state when it was first installed, and then you can call setDefaults() to reset to the default values and continue using them. From that point if you want to keep using these default values, you would want to avoid calling activate and fetch. Once you make those calls, the default values may get updated at the initial fetch call or following fetch intervals.

Also, the reset() isn't available in the iOS v2 SDK today, but it sounds like a reasonable request. Could you please file a feature request if this feature would be helpful for you?

like image 153
Sumit Chandel Avatar answered Apr 01 '23 15:04

Sumit Chandel