简体   繁体   English

Flurry 4.2.2 SDK不在iOS中发送事件会话数据

[英]Flurry 4.2.2 SDK not sending events session data in iOS

I know that there is a delay in Flurry reporting, however, we are seeing no results the following day on Flurry's reporting. 我知道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];

Our logs show the individual Flurry log calls occurring within the app. 我们的日志显示应用程序中发生的各个Flurry日志调用。 What we do NOT see is anything suggesting that the information is sent to Flurry. 我们没有看到的是暗示将信息发送到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. setSessionReportsOnPauseEnabled:setSessionReportsOnCloseEnabled:都设置为YES但是当暂停或关闭应用程序时,没有与Flurry会话数据的通信。 When I restart the app, Flurry attempts to send session data that unfortunately results in: 当我重新启动应用程序时,Flurry尝试发送不幸导致的会话数据:

FlurrySession: Add crashed former session

As instructed, we started the Flurry session in: 按照指示,我们开始了Flurry会议:

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

According to Flurry's website, we are not tracking any Events . 根据Flurry的网站,我们不会跟踪任何事件

We are using Flurry 4.2.2 SDK 我们正在使用Flurry 4.2.2 SDK

The issue which seems to be unique to Flurry SDK 4.2.2: 这个问题似乎是Flurry SDK 4.2.2独有的:

In 4.2.2 there is a new method: 在4.2.2中有一种新方法:

+ (void)setBackgroundSessionEnabled:(BOOL)setBackgroundSessionEnabled;

It automatically gets set to YES if there are any UIBackgroundModes for your app. 如果您的应用程序有任何UIBackgroundModes ,它会自动设置为YES Our app uses the GPS in the background. 我们的应用程序在后台使用GPS。 Therefore Flurry will never post session data when going to the background. 因此,Flurry在转到后台时永远不会发布会话数据。

When I force [Flurry setBackgroundSessionEnabled:NO]; 当我强制[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. 我们无需使用Flurry来更新GPS位置,因此这对我们现在起作用。

Hopefully this helps others struggling with this problem. 希望这可以帮助其他人解决这个问题。

Update: 6/17/2014: 更新:2014年6月17日:

I found more on this in Flurry's FAQ 我在Flurry的常见问题解答中找到了更多

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

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