I’ve Firebase Analytics and Distant Config pods put in.
When altering the telephone’s area (or restarting my telephone) and beginning my app once more, the distant config fetchAndActivate
takes extra time to finish. (5 to 10 sec! as a substitute of < 2sec)
After some investigation, I discovered that if I take away the firebase analytics pod, I do not see that situation anymore!
What I perceive is the Analytics will probably be began by Firebase Core when calling FirebaseApp.configure
Query:
- Is there a option to publish pone Analytics startup and fetching or has it working within the background so it is not going to have an effect on the remainder of my app?
- Does utilizing Google Analytics as a substitute of Firebase Analytics may clear up the difficulty or we’re speaking about the identical factor (there’s a completely different pod for Google Analytics)?
Right here the code that takes extra time to finish.
personal func setupRemoteConfig(completionHandler: @escaping (_ error: Error?) -> Void) {
let remoteConfigSettings = RemoteConfigSettings()
var fetchInterval: TimeInterval = 0
remoteConfigSettings.minimumFetchInterval = fetchInterval
remoteConfig.configSettings = remoteConfigSettings
remoteConfig.fetchAndActivate { standing, error in
guard error == nil, standing == .successFetchedFromRemote else {
completionHandler(error)
return
}
completionHandler(nil)
}
}
Thanks