Implementing flurry analytics crashes app

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

One thing to note, all data must be strings, so if you’re including numbers that may be a problem:

local eventData = { venueId = tostring( venue.id ), venueName = venue.name, -- I assume this is a string already size = tostring( game.size() ) } flurryAnalytics.logEvent('GAME.WIN', eventData)

Thanks roaminggamer - finally got around to pushing a build and tested it and that seems to have taken care of the crashes.

I’m going to mark this as solved, but I’d be curious to know where you read/learned the data had to be strings, as the Corona documentation certainly doesn’t mention it that I saw.

Thanks so much.

One thing to note, all data must be strings, so if you’re including numbers that may be a problem:

local eventData = { venueId = tostring( venue.id ), venueName = venue.name, -- I assume this is a string already size = tostring( game.size() ) } flurryAnalytics.logEvent('GAME.WIN', eventData)

Thanks roaminggamer - finally got around to pushing a build and tested it and that seems to have taken care of the crashes.

I’m going to mark this as solved, but I’d be curious to know where you read/learned the data had to be strings, as the Corona documentation certainly doesn’t mention it that I saw.

Thanks so much.