gpt4 book ai didi

ios - "' isDeveloperModeEnabled ' is deprecated: This no longer needs to be set during development. "isDeveloperModeEnabled 用于什么

转载 作者:行者123 更新时间:2023-12-01 15:19:45 25 4
gpt4 key购买 nike

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

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



有人可以解释解决此问题的替代方法是什么
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")
}

我需要解决上述代码的警告。这是一个现有的代码库。当我进行全局搜索时,我没有看到这个值被使用。有人请帮帮我

最佳答案

老办法:

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 ( README here)

关于ios - "' isDeveloperModeEnabled ' is deprecated: This no longer needs to be set during development. "isDeveloperModeEnabled 用于什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56693336/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com