在iOS/xCode/Swift中,因为我升级到了最新版本的iOS SDK,我得到了"Flurry.setCrashReportingEnabled is depreciated“。
这是我的代码:
...
//start flurry
Flurry.setCrashReportingEnabled(true)
Flurry.startSession(environment.flurryAPIKey)
...看看我发现的Flurry iOS SDK GitHub project“7.7.0以后就不再推荐了,请用FlurrySessionBuilder代替调用这个接口”。
但是,我在Swift中找不到任何有关此FlurrySessionBuilder使用情况的信息。如何将上述代码转换为使用此FlurrySessionBuilder来消除此贬值警告?
发布于 2017-08-15 00:25:09
在联系支持人员后,我终于在这里找到了答案:
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)https://stackoverflow.com/questions/45678256
复制相似问题