blakgeek / cordova-plugin-flurryanalytics

Adds support for all that Flurry Analytics flavored goodness to your Cordova based apps
23 stars 29 forks source link

Ios? #22

Closed thijssmudde closed 7 years ago

thijssmudde commented 7 years ago

Does this plugin work on iOS? I have it up and running for Android, but iOS doesnt seem to do anything.

blakgeek commented 7 years ago

Yes it works on iOS. Try enabling event logging to Flurry is attempting to log your events.

flurryAnalytics = new FlurryAnalytics({
    appKey: 'xxxxx',
    logLevel: 'VERBOSE',
    enableLogging: true,
    enableEventLogging: true
});
thijssmudde commented 7 years ago

See the logs from xcode here:

FlurrySession: Created active session with API[APIKEY]
2017-08-22 22:41:52.524282+0200 MyRoutes[2599:1079832] FlurrySession: Session reports on close enabled[0]
2017-08-22 22:41:52.524320+0200 MyRoutes[2599:1079832] FlurrySession: Session reports on pause enabled[0]
2017-08-22 22:41:52.524354+0200 MyRoutes[2599:1079832] FlurrySession: Event logging enabled[1]
2017-08-22 22:41:52.524386+0200 MyRoutes[2599:1079832] FlurrySession: Crash reporting enabled[1]
2017-08-22 22:41:52.524508+0200 MyRoutes[2599:1079832] FlurrySession: Set userID[<null>]
2017-08-22 22:41:52.532620+0200 MyRoutes[2599:1079707] FlurrySession: Initial timestamp[Tue Aug 22 18:03:39 2017] from secure source
2017-08-22 22:41:52.533124+0200 MyRoutes[2599:1079832] Native Debug Log: ad_fetch = 0, ad_requests = 0, ads_returned = 0, ad_ready = 0, Impression fired = 0
2017-08-22 22:41:52.536369+0200 MyRoutes[2599:1079707] Flurry: Finish starting session with apiKey[APIKEY]
2017-08-22 22:41:52.536495+0200 MyRoutes[2599:1079707] THREAD WARNING: ['FlurryAnalyticsPlugin'] took '131.393311' ms. Plugin should use a background thread.
2017-08-22 22:41:52.542420+0200 MyRoutes[2599:1079707] APIKEY
2017-08-22 22:41:52.555957+0200 MyRoutes[2599:1079832] FlurrySession: Sending sessions to server, include current YES
2017-08-22 22:41:52.559848+0200 MyRoutes[2599:1079832] -[NSNull length]: unrecognized selector sent to instance 0x1aa233ef8
2017-08-22 22:41:52.565690+0200 MyRoutes[2599:1079707] updated network status [1] ========
2017-08-22 22:41:52.565799+0200 MyRoutes[2599:1079707] FlurryDataSenderBase: networkStatusChanged to  reachable
2017-08-22 22:41:52.565898+0200 MyRoutes[2599:1079707] FlurryDataSenderBase: networkStatusChanged to  reachable
2017-08-22 22:41:52.565974+0200 MyRoutes[2599:1079707] FlurrySession: networkStatusChanged to  reachable
2017-08-22 22:41:52.566006+0200 MyRoutes[2599:1079707] FlurrySession: networkStatusChanged to  reachable
2017-08-22 22:41:52.566227+0200 MyRoutes[2599:1079851] FlurryDataSender: Not sent blocks count [0]
2017-08-22 22:41:52.566317+0200 MyRoutes[2599:1079851] FlurryPulseReportSender: -[FlurryPulseCBReportSender retransmitNotSentBlocks], Not sent blocks count [0]
thijssmudde commented 7 years ago

Still not seeing anything on the flurry dashboard :(

blakgeek commented 7 years ago

You don't have report session on close or pause enabled, which is odd because they should be enabled by default.

Try this

flurryAnalytics = new FlurryAnalytics({
    appKey: 'xxxxx',
    logLevel: 'VERBOSE',
    enableLogging: true,
    enableEventLogging: true,
    reportSessionsOnClose: true,
    reportSessionsOnPause: true
});
blakgeek commented 7 years ago

Are you trying to use the same app key for both iOS and Android?

thijssmudde commented 7 years ago

No, 100% sure the appkey is correct for iOS. I've updated to the newest version of this plugin today.

Trying with the above code, but no luck.

Logs:

Flurry: setUserID[<null>]
Flurry: Background session enabled[0]
Flurry: startSession called for the first time
Flurry: Start session called with apiKey[APIKEY]
Flurry: Starting session on Agent Version [Flurry_iOS_196_8.0.0]
Flurry: crash reporting enabled
Flurry: Trim white space and use apiKey[APIKEY]
initial network status [1] =========
Flurry: Background session enabled[0]
Flurry: setUserID[<null>]
FlurrySession: Event logging enabled[1]
FlurrySession: Session reports on close enabled[1]
FlurrySession: Session reports on pause enabled[0]
FlurrySession: Crash reporting enabled[0]
FlurrySession: Initialized session from scratch with startTime[Tue Aug 22 23:31:55 2017]
+[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPropertiesData-1410111864_196.archive
+[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryCkData-1410111864_196.archive
+[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPersistentUrlsData-1410111864_196.archive
+[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPersistenPulseUrlsData-1410111864_196.archive
+[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPersistenPulsePrepUrlsData-1410111864_196.archive
FlurrySession: Created active session with API[APIKEY]
FlurrySession: Session reports on close enabled[1]
FlurrySession: Session reports on pause enabled[1]
FlurrySession: Event logging enabled[1]
FlurrySession: Crash reporting enabled[1]
FlurrySession: Set userID[<null>]
FlurrySession: Initial timestamp[Tue Aug 22 18:03:39 2017] from secure source
Native Debug Log: ad_fetch = 0, ad_requests = 0, ads_returned = 0, ad_ready = 0, Impression fired = 0
Flurry: Finish starting session with apiKey[APIKEY]
THREAD WARNING: ['FlurryAnalyticsPlugin'] took '122.465820' ms. Plugin should use a background thread.
APIKEY
updated network status [1] ========
FlurryDataSenderBase: networkStatusChanged to  reachable
FlurryDataSenderBase: networkStatusChanged to  reachable
FlurrySession: networkStatusChanged to  reachable
FlurrySession: networkStatusChanged to  reachable
FlurrySession: Sending sessions to server, include current YES
-[NSNull length]: unrecognized selector sent to instance 0x1aa233ef8
FlurryDataSender: Not sent blocks count [0]
FlurryPulseReportSender: -[FlurryPulseCBReportSender retransmitNotSentBlocks], Not sent blocks count [0]
[WCSession onqueue_handleUpdateSessionState:]_block_invoke dropping as pairingIDs no longer match. pairingID (null), client pairingID: (null)
[WC] WCSession is not paired
CONFIG:{"dialog":false}
Exception from Tracker afterFlush function:
TypeError: undefined is not an object (evaluating 'navigator.serviceWorker.register')
error flurry: null
Flurry: Please call setAppVersion before startSession.
Flurry: setUserID[<null>]
Flurry: Background session enabled[0]
Flurry: startSession has been called already. It should only be called once. Returning.
2017-08-22 23:31:58.728903+0200 MyRoutes[2671:1092581] FlurrySession: Set userID[<null>]
2017-08-22 23:31:58.728956+0200 MyRoutes[2671:1092581] FlurrySession: Event logging enabled[1]
2017-08-22 23:31:58.728991+0200 MyRoutes[2671:1092581] FlurrySession: Session reports on close enabled[1]
2017-08-22 23:31:58.729023+0200 MyRoutes[2671:1092581] FlurrySession: Session reports on pause enabled[1]
2017-08-22 23:31:58.729054+0200 MyRoutes[2671:1092581] FlurrySession: Crash reporting enabled[1]
APIKEY
error flurry: null
FlurryPulseEventController: pause session called
FlurrySession: Pause session with pauseTime[Tue Aug 22 23:32:25 2017]
FlurrySession: Finish session with endTime[Tue Aug 22 23:32:25 2017]
FlurrySession: ending all unterminated timed events with _endTime[Tue Aug 22 23:32:25 2017]...
FlurrySession: ...finished ending un-ended timed events.
2017-08-22 23:32:25.412401+0200 MyRoutes[2671:1092965] [WC] already in progress or activated
FlurrySession: Sending sessions to server, include current YES
-[NSNull length]: unrecognized selector sent to instance 0x1aa233ef8
2017-08-22 23:32:25.444102+0200 MyRoutes[2671:1092581] +[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryCkData-1410111864_196.archive
2017-08-22 23:32:25.452229+0200 MyRoutes[2671:1093005] +[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPersistenPulsePrepUrlsData-1410111864_196.archive
2017-08-22 23:32:25.447009+0200 MyRoutes[2671:1092965] +[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPersistentUrlsData-1410111864_196.archive
2017-08-22 23:32:25.448902+0200 MyRoutes[2671:1092215] +[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPersistenPulseUrlsData-1410111864_196.archive
+[FlurryGlobalVariableStorage getPersistentFilePath:]: /var/mobile/Containers/Data/Application/2BFA9200-8715-43B2-A106-51F9E5273E88/Library/Application Support/FlurryFiles/.flurryPropertiesData-1410111864_196.archive
[INFO] GCDWebServer stoppe[WCSession onqueue_handleUpdateSessionState:]_block_invoke dropping as pairingIDs no longer match. pairingID (null), client pairingID: (null)
[WC] WCSession is not paire[WCSession xpcConnectionRestoredWithState:]_block_invoke dropping as pairingIDs no longer match. pairingID (null), client pairingID: (null)
[INFO] GCDWebServer started on port 12560 and reachable at http://localhost:12560/
Flurry: Background session enabled[0]
Flurry: setUserID[<null>]
FlurrySession: Event logging enabled[1]
FlurrySession: Session reports on close enabled[1]
FlurrySession: Session reports on pause enabled[0]
FlurrySession: Crash reporting enabled[0]
FlurrySession: Initialized session from scratch with startTime[Tue Aug 22 23:32:32 2017]
FlurrySession: Created active session with API[APIKEY]
FlurrySession: dealloc session
FlurrySession: Session reports on close enabled[1]
FlurrySession: Session reports on pause enabled[1]
FlurrySession: Event logging enabled[1]
FlurrySession: Crash reporting enabled[1]
FlurrySession: Set userID[<null>]
FlurrySession: Initial timestamp[Tue Aug 22 18:03:39 2017] from secure source
FlurryPulseEventController: app resuming
FlurrySession: networkStatusChanged to  reachable
Native Debug Log: ad_fetch = 0, ad_requests = 0, ads_returned = 0, ad_ready = 0, Impression fired = 0
2017-08-22 23:32:32.614797+0200 MyRoutes[2671:1093005] [WC] already in progress or activated
FlurrySession: Sending sessions to server, include current YES
-[NSNull length]: unrecognized selector sent to instance 0x1aa233ef8
blakgeek commented 7 years ago

Sorry, I have no clue why the sessions aren't showing up other than possibly the normal delay. As far as I can tell the sessions are being sent. Maybe try recording an event and see if that shows up.

thijssmudde commented 7 years ago

Okay, I will try to send an event and report back. No worries as this might not be on your side after all.

thijssmudde commented 7 years ago

After a really long time (1hour) one session got recorded and 1 event, but its not working now.

Is it necessary to create accessrules in the config file?

ps: Im using this plugin with MeteorJS.

blakgeek commented 7 years ago

I don't use meteor but I haven't had to do anything special as far as access rules.

On Aug 23, 2017 6:51 PM, "fullhdpixel" notifications@github.com wrote:

After a really long time (1hour) one session got recorded and 1 event, but its not working now.

Is it necessary to create accessrules in the config file?

ps: Im using this plugin with MeteorJS.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blakgeek/cordova-plugin-flurryanalytics/issues/22#issuecomment-324484645, or mute the thread https://github.com/notifications/unsubscribe-auth/AAyU3hgFkGibgs9Orw9UNifnKjXzgT4rks5sbKzTgaJpZM4OzPQP .

thijssmudde commented 7 years ago

okay, well I'll retry in a new project

blakgeek commented 7 years ago

I'm gonna close this for now. As far as I can tell the plugin is working.