本文介绍了Flurry 4.2.2 SDK不会在iOS中发送会话数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Flurry的报告有延迟,但是Flurry的报告第二天没有发现任何结果。

  [Flurry setDebugLogEnabled:YES]; 
[Flurry setLogLevel:FlurryLogLevelDebug];
[Flurry startSession:_appSettings.flurryAppId];
[Flurry setSessionReportsOnCloseEnabled:YES];
[Flurry setSessionReportsOnPauseEnabled:YES];
[Flurry setEventLoggingEnabled:YES];
UIDevice * device = [UIDevice currentDevice];
[Flurry logEvent:@SESSION_START
withParameters:[NSDictionary dictionaryWithObjectsAndKeys:[device systemVersion],@OS,nil]
timed:YES];

我们的日志显示在应用程序中发生的单个Flurry日志调用。我们做什么 看到的是任何建议将信息发送到Flurry的消息。



两个 setSessionReportsOnPauseEnabled: setSessionReportsOnCloseEnabled:设置为 YES 但没有任何通信应用程式暂停或关闭时,会显示一连串的会话数据。当我重新启动应用程序时,Flurry会尝试发送不幸的结果:

  FlurrySession:添加崩溃的前会话

按照指示,我们开始了Flurry会话:

   - (BOOL)应用程序:(UIApplication *)应用程序didFinishLaunchingWithOptions:(NSDictionary *)launchOptions方法您的AppDelegate 

根据Flurry的网站,我们没有跟踪任何活动



我们正在使用Flurry 4.2 .2 SDK

解决方案

Flurry SDK 4.2.2似乎是唯一的问题:



在4.2.2中有一个新的方法:

  +(void)setBackgroundSessionEnabled:(BOOL) setBackgroundSessionEnabled; 

它会自动设置为 YES 如果有是您的应用程序的任何 UIBackgroundModes 我们的应用程序在后台使用GPS。因此,在进入后台时,Flurry永远不会发布会话数据。



当我强制 [Flurry setBackgroundSessionEnabled:NO]; 然后当主页按钮按下并且应用程序进入后台。



我不知道这可以如何工作,否则。我们没有必要使用Flurry来更新GPS位置,所以这可以为我们现在工作。



希望这有助于其他人努力解决这个问题。

更新:6/17/2014:



我在Flurry的


I know that there is a delay in Flurry reporting, however, we are seeing no results the following day on Flurry's reporting.

    [Flurry setDebugLogEnabled:YES];
    [Flurry setLogLevel:FlurryLogLevelDebug];
    [Flurry startSession:_appSettings.flurryAppId];
    [Flurry setSessionReportsOnCloseEnabled:YES];
    [Flurry setSessionReportsOnPauseEnabled:YES];
    [Flurry setEventLoggingEnabled:YES];
    UIDevice *device = [UIDevice currentDevice];
    [Flurry logEvent:@"SESSION_START"
      withParameters:[NSDictionary dictionaryWithObjectsAndKeys:[device systemVersion], @"OS", nil]
               timed:YES];

Our logs show the individual Flurry log calls occurring within the app. What we do NOT see is anything suggesting that the information is sent to Flurry.

Both setSessionReportsOnPauseEnabled: and setSessionReportsOnCloseEnabled: are set to YES but there is no communication to Flurry of session data when the app is paused or closed. When I restart the app, Flurry attempts to send session data that unfortunately results in:

FlurrySession: Add crashed former session

As instructed, we started the Flurry session in:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method of your AppDelegate

According to Flurry's website, we are not tracking any Events.

We are using Flurry 4.2.2 SDK

解决方案

The issue which seems to be unique to Flurry SDK 4.2.2:

In 4.2.2 there is a new method:

+ (void)setBackgroundSessionEnabled:(BOOL)setBackgroundSessionEnabled;

It automatically gets set to YES if there are any UIBackgroundModes for your app. Our app uses the GPS in the background. Therefore Flurry will never post session data when going to the background.

When I force [Flurry setBackgroundSessionEnabled:NO]; then it sends up the session data when the Home Button is pressed and the app goes to the background.

I am not sure how this could ever work otherwise. We don't have a need to use Flurry to update GPS locations so this can work for us now.

Hopefully this helps others struggling with this problem.

Update: 6/17/2014:

I found more on this in Flurry's FAQ

这篇关于Flurry 4.2.2 SDK不会在iOS中发送会话数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:52
查看更多