Flurry setCrashReportingEnabled(true) 在 Swift 中贬值



在iOS/xCode/Swift中,自从我升级到最新版本的Flurry iOS SDK后,我得到了"Flurry.setCrashReportingEnabled is depreciated"。

这是我的代码:

...
//start flurry
Flurry.setCrashReportingEnabled(true)
Flurry.startSession(environment.flurryAPIKey)
...

查看 FlurryiOS SDK GitHub 项目,我发现"自 7.7.0 起已弃用,请使用 FlurrySessionBuilder 代替调用此 API。

但是,我在 Swift 中找不到有关此 FlurrySessionBuilder 使用的任何信息。 如何将上面的代码转换为使用此FlurrySessionBuilder来摆脱此折旧警告?

联系支持人员后 慌乱的支持 我终于在这里找到了答案:

https://developer.yahoo.com/flurry/docs/integrateflurry/ios/#initialize-flurry

let builder = FlurrySessionBuilder.init()
.withAppVersion("1.0")
.withLogLevel(FlurryLogLevelAll)
.withCrashReporting(true)
.withSessionContinueSeconds(10)
// Replace YOUR_API_KEY with the api key in the downloaded package
Flurry.startSession("YOUR_API_KEY", with: builder)

最新更新