I’m implementing flurry into a new app and following the guide here
https://docs.coronalabs.com/plugin/flurry-analytics/init.html
I created an events modules to abstract flurry away from the rest of the app - here’s a shortened version of what that looks like
local flurryAnalytics = require("plugin.flurry.analytics") local function flurryListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the Flurry plugin -- User account: peter.bailey@colossal.net flurryAnalytics.init( flurryListener, { apiKey="API\_KEY\_REDACTED" } ) local M = {} function M.winGame(game) local venue = game.venue() local eventData = { venueId = venue.id, venueName = venue.name, size = game.size() } flurryAnalytics.logEvent('GAME.WIN', eventData) end return M
When running in the simulator, none of this code runs per this warning in the console
WARNING: The Flurry plugin is only supported on Android & iOS devices. Please build for device
So when I build for a device (in my case, an iPhone 6) and run my app and “win” a game, it crashes. No crash log is generated, no event is logged in my Flurry dashboard.
if I comment-out the call to flurryAnalytics.init() then the app does not crash, but obviously it also doesn’t record events.
I feel like I’ve implemented this by to book, but it’s clearly not working. Any assistance would be appreciated