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

3

12

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

Caputo answered 20/6, 2019 at 20:18 Comment(0)
A
22

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)

Ancestry answered 1/10, 2019 at 13:55 Comment(0)
B
1

That config setting is deprecated.. With a simple google search..

https://firebase.google.com/docs/reference/android/com/google/firebase/remoteconfig/FirebaseRemoteConfigSettings.html#getMinimumFetchIntervalInSeconds()

The docs say to use getMinimumFetchIntervalInSeconds() instead of isDeveloperModeEnabled().

Update -- Android docs say it is deprecated, iOS does not say anything about deprecating isDeveloperModeEnabled

https://firebase.google.com/docs/reference/swift/firebaseremoteconfig/api/reference/Classes/RemoteConfigSettings

Bova answered 20/6, 2019 at 20:26 Comment(2)
The URL points to Android SDK docs, while the question relates to iOS.Waterlogged
Woops -- Didn't even realize this. The OP didn't question this though.. Maybe it worked?? Perhaps the iOS docs are outdated as the iOS isDeveloperModeEnabled is not marked as deprecated. firebase.google.com/docs/reference/swift/firebaseremoteconfig/…Bova
H
1

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

FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] init];
[remoteConfigSettings setMinimumFetchInterval:0];
Haymow answered 25/1, 2021 at 18:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.