isDeveloperModeEnabled

isDeveloperModeEnabled

本文介绍了"isDeveloperModeEnabled"已弃用:在开发过程中不再需要设置此设置. " isDeveloperModeEnabled用于什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为将代码库升级到Swift5的一部分,我在项目中更新了Firebase pod.之后,我开始收到如下警告.

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.

有人可以解释解决此问题的另一种方法

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

推荐答案

旧方法:

let remoteConfigSettings = RemoteConfigSettings(developerModeEnabled: true)

新方法:

let remoteConfigSettings = RemoteConfigSettings()
remoteConfigSettings.minimumFetchInterval = 0

iOS文档尚未提及已弃用developerModeEnabled,但可以在此处找到更新的注释示例: https://github.com/firebase/quickstart-ios/blob/master/config/ConfigExample/RemoteConfigViewController.swift#L57 (在此处自述)

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)

这篇关于"isDeveloperModeEnabled"已弃用:在开发过程中不再需要设置此设置. " isDeveloperModeEnabled用于什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 17:12