简体   繁体   English

在Swift中使用Flurry

[英]Using Flurry with Swift

Is it currently possible to implement Flurry using Swift and log events? 当前是否可以使用Swift和log事件实现Flurry? I followed this post, but no events are being logged: how to integrate flurry in ios using swift language . 我关注了这篇文章,但没有记录任何事件: 如何使用swift语言将flurry集成到ios中

I imported the Flurry SDK 6.0.0, have a bridging header that is working properly, imported the 'Security' and 'SystemConfiguration' frameworks, and am attempting to log events as follows in the 'applicationDidFinishLaunchingWithOptions' function: 我导入了Flurry SDK 6.0.0,使其桥接头正常工作,导入了“安全”和“系统配置”框架,并尝试在“ applicationDidFinishLaunchingWithOptions”函数中记录事件,如下所示:

Flurry.startSession("KEY HERE") //This part seems to be working since it prints to the console when it logs in
Flurry.setCrashReportingEnabled(true) 

Flurry.logEvent("Event Name")

var idDict = NSDictionary(object: "Id here", forKey: "ID")
Flurry.logEvent("Testing Swift", withParameters: idDict)

According to a support rep with Flurry, the real problem with my attempt to log events is that I was attempting to do so in the 'applicationDidFinishLaunchingWithOptions' function. 根据Flurry的支持代表的说法,尝试记录事件的真正问题在于我试图在“ applicationDidFinishLaunchingWithOptions”函数中进行记录。 Apparently there is am issue with Flurry SDK 6.0.0 that does not allow events to be logged from inside that function in the AppDelegate. 显然Flurry SDK 6.0.0存在一个问题,该问题不允许在AppDelegate中的该函数内部记录事件。 I tried logging an event elsewhere and it worked. 我试着在其他地方记录一个事件,它奏效了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM