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?
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?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With