swift - 如何重置激活的远程配置值

标签 swift firebase firebase-remote-config

使用 Firebase,在我获取并激活我的远程配置值后,调用 configValue(forKey key: String?) 会给我来自远程源的值。我知道我可以调用 func configValue(forKey key: String?, source: RemoteConfigSource)defaultValue(forKey key: String?) 来获取默认值。但是,我该如何重置激活的数据,以便调用 configValue 时再次为我提供默认值?

此外,持续存在的激活值是否会被清除?

最佳答案

Firebaser 提供一些可能有用的额外信息。

Android SDK 确实有一个 reset method从 v2 版本开始,它可以满足您在这里的需求。 reset() 调用会将 Remote Config 重置为首次安装时的状态,然后您可以调用 setDefaults() 重置为默认值并继续使用它们。从那时起,如果你想继续使用这些默认值,你会希望避免调用 activate 和 fetch。进行这些调用后,默认值可能会在初始提取调用或提取间隔后得到更新。

此外,reset() 目前在 iOS v2 SDK 中不可用,但这听起来像是一个合理的请求。你能please file a feature request吗此功能是否对您有帮助?

关于swift - 如何重置激活的远程配置值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57300678/

相关文章:

firebase - 使用 Go 为 Remote Config REST API 验证服务帐户

android - Firebase Remote Config 限速是怎么计算的?

swift - 无法从 Firestore 数据库加载分段控制 TableView 中的数据

iOS:如何检测设备辅助功能设置中的 "Larger Accessibility sizes"开关是否打开/关闭

ios - 是否 openParentApplication :reply require App Groups capability to be enabled?

swift 3 : How to retry Firebase upload on failure

ios - Remote Config A/B Test 不在 iOS 上提供结果

ios - 在 Swift 中将十六进制字符串转换为 NSData

javascript - Firebase AngularFire $保存不需要的结果

Firebase 删除后仍在检索 authData