Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"'isDeveloperModeEnabled' is deprecated: This no longer needs to be set during development. " What is isDeveloperModeEnabled used for

As a part of upgrading the code base to Swift5, I have updated Firebase pod in my project. After that i started getting warning as below.

isDeveloperModeEnabled is deprecated: This no longer needs to be set during development. Refer to documentation for additional details..

Can somebody explain what is the alternative way to resolve this issue

remoteConfig = RemoteConfig.remoteConfig()

let conSettings = RemoteConfigSettings(developerModeEnabled: true)

if TargetBuild.isProd {

   remoteConfig.configSettings = RemoteConfigSettings()

} else if settings.isDeveloperModeEnabled {

    remoteConfig.configSettings = conSettings

} else {
    print("Could not set config settings")
}

i need to resolve the warning on above code. This was an existing codebase. When i did a global search, i didnt see this value getting used. somebody please help me

like image 340
user1751876 Avatar asked Jun 20 '19 20:06

user1751876


2 Answers

Old way:

let remoteConfigSettings = RemoteConfigSettings(developerModeEnabled: true)

New way:

let remoteConfigSettings = RemoteConfigSettings()
remoteConfigSettings.minimumFetchInterval = 0

The iOS documentation does not yet mention that developerModeEnabled is deprecated, but an updated commented example can be found here: https://github.com/firebase/quickstart-ios/blob/master/config/ConfigExample/RemoteConfigViewController.swift#L57 (README here)

like image 113
José Avatar answered Sep 17 '22 12:09

José


If you are using Objective-C, you can solve the issue with:

FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] init];
[remoteConfigSettings setMinimumFetchInterval:0];
like image 33
pableiros Avatar answered Sep 19 '22 12:09

pableiros