简体   繁体   中英

Session are logging but events aren't logging in Flurry for iPhone app

I integrated flurry with my app. I also already posted Question related to path issue but no body gave me answer. I thought due to path issue connection has been lost with my app to flurry. Now I saw sessions are creating but events aren't logging. I re checked my code it was fine for logging. Kindly help me on this if any body face this issue. Thanks in advance.

I had a the same problem, I fixed it when I analyzed the logs and realized that the session was not being sent to the flurry servers and therefor the events were not being registered. Now the reason why the session was not being sent was because I was running the app on the simulator and I was terminating the app by pressing the stop button in Xcode. When you do that, the session will not be sent to the Flurry servers. The way Flurry works by default is that it sends the session to the servers when the app is closed naturally, that happens when the user closes the app by pressing the back button on his device and again double pressing the back button and closing the app. I tried that on a test device and even on the emulator and the events were finally logging on the dashboard! So what you need to do is terminate the app normally instead of pressing the stop button on the Xcode IDE. Good luck!

You can set up flurry at AppDelegate didFinishLaunchOptions method as below

dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){
        dispatch_async(dispatch_get_main_queue(), ^(void){


            [Flurry setCrashReportingEnabled:YES];

            [Flurry startSession:@"your_App_API_key"];//client

        });
    });

Where ever you want log event. You can put below statement with your event name.

[Flurry logEvent:@"Profile_View"];

It takes some hours to update at Flurry site. You can visit Applications --> Event --> Event Logs

Hope it helps you...!

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