ios – Why the first time the app is installed, remote config takes time to fetch data?


I noticed that each time I re-install my app OR change iPhone’s region, the fetchAndActivate takes more time (> 5sec and even much more)

The Android version does not seem to be affected by that long delay.

Am I doing something wrong with the code below?

private func setupRemoteConfig(completionHandler: @escaping (_ error: Error?) -> Void) {

    let remoteConfigSettings = RemoteConfigSettings()
    var fetchInterval: TimeInterval = 0

    remoteConfigSettings.minimumFetchInterval = fetchInterval
    remoteConfig.configSettings = remoteConfigSettings
    
    remoteConfig.fetchAndActivate { status, error in

        guard error == nil, status == .successFetchedFromRemote else {
            completionHandler(error)
            return
        }


        completionHandler(nil)
    }
}
```

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img