开发者

Choosing when to send data with Flurry on iPad

开发者 https://www.devze.com 2023-03-14 05:33 出处:网络
I would like to add Flurry to an i开发者_如何学编程Pad app that is meant to stay running in the foreground for several weeks.

I would like to add Flurry to an i开发者_如何学编程Pad app that is meant to stay running in the foreground for several weeks.

Flurry apparently only uploads information to its servers on events such as app start, app close, app pause, but I don't expect my app to enter those states very often. I need app feedback sooner.

Is it possible to force Flurry to send data on a timer, say every hour or two?


I found a way that seems to work. To test, I created an NSTimer that calls [FlurryAPI startSession:@"yourKeyHere"] every five minutes, then let my program run without stopping or pausing it in any way, and the event data is appearing on the Flurry server.

The comments above that method in the .h file do say "start session, attempt to send saved sessions to server", so in a sense it's documented, but it feels like a hack to have to call something called startSession more than once per application run. This is partly why I'm switching to MixPanel, which has a documented upload interval feature.

0

精彩评论

暂无评论...
验证码 换一张
取 消