gpt4 book ai didi

iOS swift : Firebase Remote Config fetch values

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:08:05 26 4
gpt4 key购买 nike

有没有一种方法或委托(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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com