是否有方法或委托在应用程序运行时捕获更新的值而不终止应用程序。我正在使用此方法来获取值并进行更新。
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时才执行此操作)