iOS swift : Firebase Remote Config fetch values
<p><p>有没有办法或委托(delegate)在应用程序运行时捕获更新的值而不终止应用程序。我正在使用这种方法来获取值并更新。 </p>
<pre><code> RemoteConfig.remoteConfig().fetch(withExpirationDuration: duration) { (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()
}
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p><code>activateFetched()</code> 调用将确保获取最新的更新数据(来自默认设置或远程配置),而无需终止应用程序。<br/>
我认为你的问题来自持续时间。<br/>
尝试将持续时间设置为 0(确保仅在开发者模式为 <a href="https://firebase.google.com/docs/reference/ios/firebaseremoteconfig/api/reference/Classes/FIRRemoteConfigSettings" rel="noreferrer noopener nofollow">enabled</a> 时才这样做)</p></p>
<p style="font-size: 20px;">关于iOSswift: Firebase Remote Config fetch values,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/46194616/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/46194616/
</a>
</p>
页:
[1]