[英]Flurry 4.2.2 SDK not sending events session data in 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會話數據的通信。 當我重新啟動應用程序時,Flurry嘗試發送不幸導致的會話數據:
FlurrySession: Add crashed former session
按照指示,我們開始了Flurry會議:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method of your AppDelegate
根據Flurry的網站,我們不會跟蹤任何事件 。
我們正在使用Flurry 4.2.2 SDK
這個問題似乎是Flurry SDK 4.2.2獨有的:
在4.2.2中有一種新方法:
+ (void)setBackgroundSessionEnabled:(BOOL)setBackgroundSessionEnabled;
如果您的應用程序有任何UIBackgroundModes
,它會自動設置為YES
。 我們的應用程序在后台使用GPS。 因此,Flurry在轉到后台時永遠不會發布會話數據。
當我強制[Flurry setBackgroundSessionEnabled:NO];
然后,當按下主頁按鈕並且應用程序進入后台時,它會發送會話數據。
我不確定這怎么會起作用。 我們無需使用Flurry來更新GPS位置,因此這對我們現在起作用。
希望這可以幫助其他人解決這個問題。
更新:2014年6月17日:
我在Flurry的常見問題解答中找到了更多
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.