iOS swift : Firebase Remote Config fetch values

标签 ios swift firebase firebase-remote-config

有没有一种方法或委托(delegate)可以在应用程序运行时捕获更新的值而不终止应用程序。我正在使用这种方法来获取值和更新。

    RemoteConfig.remoteConfig().fetch(withExpirationDuration: duration) { [weak self] (status, error) in

        guard error == nil else {
            print("Got an error fetching remote values \(error!)")
            return
        }

        print ("Retrieved values from the cloud!")

        RemoteConfig.remoteConfig().activateFetched()

        guard let strongSelf = self else { return }
        strongSelf.updateWithRomteConfigValues()

    }

最佳答案

activateFetched() 调用将确保在无需终止应用程序的情况下获取最新的更新数据(来自默认值或远程配置)。
我认为你的问题出在时长上。
尝试将持续时间设置为 0(确保仅在开发者模式为 enabled 时才这样做)

关于iOS swift : Firebase Remote Config fetch values,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46194616/

相关文章:

firebase - firebase "Size of one child value"限制 10Mb 的含义

ios - iOS 中的音频信号处理

ios - 在 native 模块库中找不到 ios 框架 header

ios - 在 Swift 中以 Equatable 和 Printable 作为参数的通用函数和属性

ios - Firebase、iOS 和 Swift 入门

ios - 仅显示当前用户登录的 TableView 中的帖子

ios - 无法将插件添加到phonegap Cordova 3.1.0

ios - 在IOS中为PDF文件设置密码

ios - 在 Swift 中使用 renderInContext 出现在屏幕上时捕获选定 View 的问题

swift - 使用 NSURLSession 下载委托(delegate)(IOS,swift)