简体   繁体   中英

Using Flurry with Swift

Is it currently possible to implement Flurry using Swift and log events? I followed this post, but no events are being logged: how to integrate flurry in ios using swift language .

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.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. 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. I tried logging an event elsewhere and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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