How long for Firebase Remote Config to push?
Asked Answered
D

1

6

How long does it take for a remote config to push? I have the following code, which continues to print false and the old value for at least a few minutes after pushing a new update on the web.

remoteConfig.fetchWithCompletionHandler { (status, error) -> Void in
    if (status == FIRRemoteConfigFetchStatus.Success) {
        print("Config fetched.")
        print(self.remoteConfig.activateFetched())
        print(self.remoteConfig.configValueForKey("my_key").stringValue)
    } else {
        print("Config not fetched.")
    }
}
Dykstra answered 19/9, 2016 at 23:28 Comment(1)
it should show you new notification maximum 5 second. id your internet connection is fast. if your internet connection is fast then hosting problem.Diamine
D
10

The default behavior is to cache for 12 hours, according to the documentation. The function

fetchWithExpirationDuration(expirationDuration: NSTimeInterval, completionHandler: FIRRemoteConfigFetchCompletion?)

specifies the cache duration. At first glance, I thought the duration was a timeout on the network request — in fact, it's a timeout on the cache. If you use this with a short duration, the values will reload as quickly as you set the cache to expire.

Dykstra answered 20/9, 2016 at 1:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.