简体   繁体   English

如何将Flurry分析集成到iOS应用程序中

[英]How to integrate Flurry analytics into iOS app

I have Flurry.h and libFlurry.a added to my project from the Flurry 4.1 SDK. 我有Flurry.hlibFlurry.a从Flurry 4.1 SDK添加到我的项目中。 In my app delegate I have the following in didFinishLaunchingWithOptions . 在我的app委托中,我在didFinishLaunchingWithOptions有以下内容。

[Flurry startSession:@"[apikey]"];

I've also added [Flurry logEvent:@"callAPIPath"]; 我还添加了[Flurry logEvent:@"callAPIPath"]; in the codebase such that it will get called 5 or 6 times in a typical session. 在代码库中,它将在典型会话中被调用5或6次。 However, I don't see any data on my Flurry dashboard. 但是,我在Flurry仪表板上看不到任何数据。 I'm testing in the iOS simulator and click the home button to quit the app since that was suggested in https://stackoverflow.com/a/12054855/99683 . 我正在iOS模拟器中测试并单击主页按钮退出应用程序,因为这是在https://stackoverflow.com/a/12054855/99683中建议的。 I've given it over 24 hours to process but still no data. 我已经花了24小时处理它但仍然没有数据。

I don't see any obvious problems in the debug output. 我没有在调试输出中看到任何明显的问题。

2013-01-29 16:04:04.579 TumTiki[7578:c07] Flurry: startSession called for the first time
2013-01-29 16:04:04.580 TumTiki[7578:c07] Flurry: Start session called with apiKey[APIKEY]
2013-01-29 16:04:04.580 TumTiki[7578:c07] Flurry: Trim white space and use apiKey[APIKEY]
2013-01-29 16:04:04.581 TumTiki[7578:c07] initial network status [1] ========= 
2013-01-29 16:04:04.583 TumTiki[7578:c07] FlurrySession: Add session with startTime[2013-01-29 23:04:37 +0000] to saved sessions
2013-01-29 16:04:04.587 TumTiki[7578:c07] FlurrySession: Add crashed former session
2013-01-29 16:04:04.589 TumTiki[7578:c07] FlurrySession: Initialized session from scratch with startTime[2013-01-30 00:04:04 +0000]
2013-01-29 16:04:04.590 TumTiki[7578:c07] FlurrySession: Created active session with API[APIKEY]
2013-01-29 16:04:04.590 TumTiki[7578:c07] FlurrySession: Session reports on close enabled[1]
2013-01-29 16:04:04.590 TumTiki[7578:c07] FlurrySession: Session reports on pause enabled[1]
2013-01-29 16:04:04.591 TumTiki[7578:c07] FlurrySession: Event logging enabled[1]
2013-01-29 16:04:04.591 TumTiki[7578:c07] FlurrySession: Sending sessions to server withTimeout[0]
2013-01-29 16:04:04.593 TumTiki[7578:c07] FlurrySession: Initial timestamp[2013-01-29 18:12:18 +0000] from saved source
2013-01-29 16:04:04.594 TumTiki[7578:c07] Flurry: Finish starting session with apiKey[APIKEY]
2013-01-29 16:04:04.603 TumTiki[7578:c07] FlurrySession: Recording event eventName[callAPIPath] with parameters[(null)]
2013-01-29 16:04:04.603 TumTiki[7578:c07] FlurrySession: Event count for eventName[callAPIPath] updated to count[1]
2013-01-29 16:04:04.603 TumTiki[7578:c07] FlurrySession: Event log for eventName[callAPIPath] updated
2013-01-29 16:04:04.604 TumTiki[7578:c07] FlurrySession: Recording event eventName[callAPIPath] with parameters[(null)] complete
2013-01-29 16:04:04.660 TumTiki[7578:c07] FlurrySession: dealloc session
2013-01-29 16:04:04.687 TumTiki[7578:c07] updated network status [1] ======== 
2013-01-29 16:04:04.786 TumTiki[7578:c07] Flurry: HTTP connection delegate received response[<NSHTTPURLResponse: 0xa4b82e0>]
2013-01-29 16:04:04.787 TumTiki[7578:c07] FlurrySession: async http response code: 200
2013-01-29 16:04:04.788 TumTiki[7578:c07] FlurrySession: application sent session[1]
2013-01-29 16:04:04.788 TumTiki[7578:c07] FlurrySession: Sent 1 session(s).

[pressed home button] [按下主页按钮]

2013-01-29 16:07:08.166 TumTiki[7578:c07] FlurrySession: Pause session with pauseTime[2013-01-30 00:07:08 +0000]
2013-01-29 16:07:08.166 TumTiki[7578:c07] FlurrySession: Ending session with endTime[2013-01-30 00:07:08 +0000]
2013-01-29 16:07:08.167 TumTiki[7578:c07] FlurrySession: ending all unterminated timed events with _endTime[2013-01-30 00:07:08 +0000]...
2013-01-29 16:07:08.167 TumTiki[7578:c07] FlurrySession: ...finished ending un-ended timed events.
2013-01-29 16:07:08.168 TumTiki[7578:c07] FlurrySession: Ending session with endTime[2013-01-30 00:07:08 +0000] complete
2013-01-29 16:07:08.168 TumTiki[7578:c07] Flurry: start background task
2013-01-29 16:07:08.169 TumTiki[7578:c07] FlurrySession: Sending sessions to server withTimeout[1]
2013-01-29 16:07:08.171 TumTiki[7578:c07] FlurrySession: Initial timestamp[2013-01-29 18:12:18 +0000] from saved source
2013-01-29 16:07:08.387 TumTiki[7578:c07] Flurry: HTTP connection delegate received response[<NSHTTPURLResponse: 0x1127cf30>]
2013-01-29 16:07:08.389 TumTiki[7578:c07] FlurrySession: async http response code: 200
2013-01-29 16:07:08.390 TumTiki[7578:c07] Flurry: stop background task

I'm using the API Key provided by Flurry which is a 20 character string. 我正在使用Flurry提供的API密钥,它是一个20个字符的字符串。 Is there a different application key I should be using instead? 我应该使用不同的应用程序密钥吗? I'm doing something wrong here but haven't been able to figure it out yet. 我在这里做错了什么但是还没弄清楚。

Turns out I was using the wrong key. 结果我使用了错误的密钥。 I needed the application-specific key which can be found with the Manage menu item on the application's dashboard. 我需要特定于应用程序的密钥,可以通过应用程序仪表板上的“管理”菜单项找到该密钥。

20 character string is correct. 20个字符串是正确的。 Maybe a suggestion: Try in a device. 也许一个建议:尝试在设备中。

Try adding the FlurryAds.h,FlurryAdDelegate.h and libFlurryAds.a as well. 尝试添加FlurryAds.h,FlurryAdDelegate.h和libFlurryAds.a。 These are besides the Flurry.h and libFlurry.a 这些除了Flurry.h和libFlurry.a之外

The debug output suggests that the sessions are getting sent across to Flurry. 调试输出表明会话正在发送到Flurry。 It would be great if you can send over your snippet of integration and API key to support@flurry.com, and let Support take a look. 如果您可以将您的整合和API密钥片段发送到support@flurry.com,那就太棒了,让支持人员看看。

Full disclosure: I work in the Support team at Flurry 完全披露:我在Flurry的支持团队工作

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

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