Game Analytics v2 : Initialize SDK failed - Unauthorized

Hi!

I followed the guide to setup Game Analytics in corona (https://github.com/GameAnalytics/GA-SDK-CORONA/wiki). 

Downloaded and selected Xcode 7.3 to be able to build in iOS9, and got a warning whenever I try to send and analytics (in this case, and addErrorEvent) :

\<Warning\>: Warning/GA/Analytics: Initialize SDK failed - Unauthorized \<Warning\>: Warning/GA/Analytics: Could not start session: SDK is disabled.

The weird thing is the init seems to go flawlessly as shown with this, at the beginning of my app : 

\<Warning\>: Info/GA/Analytics: Starting a new session.

I didn’t find anything on the issue, if someone has an idea, thanks in advance!

Are you initializing the plugin before you try to start your session?

Rob

Hi Rob!

Yes, I am.

Here is the code I wrote for this purpose : 

if (system.getInfo("environment") ~= "simulator") then gameanalytics = require 'plugin.gameanalytics\_v2' gameanalytics.setEnabledInfoLog(true) gameanalytics.setEnabledVerboseLog(true) gameanalytics.configureBuild(config.GA.apple.build\_name) gameanalytics.initialize { &nbsp; &nbsp; gameKey = config.GA.apple.game\_key, &nbsp; &nbsp; gameSecret = config.GA.apple.secret\_key } end

This is called at the application start.

I have a config file (in a scripts subfolder, not the corona one), which contains :

GA = { &nbsp; &nbsp; apple = { &nbsp; &nbsp; build\_name = "0.1", &nbsp; &nbsp; game\_key = "Mykeynumber", &nbsp; &nbsp; secret\_key = "Mysecret" }, &nbsp; &nbsp; android = { &nbsp; &nbsp; build\_name = '0.1', &nbsp; &nbsp; game\_key = 'XX', &nbsp; &nbsp; secret\_key = 'XX', &nbsp; &nbsp; } },

nb: I obviously edited out the game/secret key

Let me move this to the GameAnalytics forum.

Rob

Are you initializing the plugin before you try to start your session?

Rob

Hi Rob!

Yes, I am.

Here is the code I wrote for this purpose : 

if (system.getInfo("environment") ~= "simulator") then gameanalytics = require 'plugin.gameanalytics\_v2' gameanalytics.setEnabledInfoLog(true) gameanalytics.setEnabledVerboseLog(true) gameanalytics.configureBuild(config.GA.apple.build\_name) gameanalytics.initialize { &nbsp; &nbsp; gameKey = config.GA.apple.game\_key, &nbsp; &nbsp; gameSecret = config.GA.apple.secret\_key } end

This is called at the application start.

I have a config file (in a scripts subfolder, not the corona one), which contains :

GA = { &nbsp; &nbsp; apple = { &nbsp; &nbsp; build\_name = "0.1", &nbsp; &nbsp; game\_key = "Mykeynumber", &nbsp; &nbsp; secret\_key = "Mysecret" }, &nbsp; &nbsp; android = { &nbsp; &nbsp; build\_name = '0.1', &nbsp; &nbsp; game\_key = 'XX', &nbsp; &nbsp; secret\_key = 'XX', &nbsp; &nbsp; } },

nb: I obviously edited out the game/secret key

Let me move this to the GameAnalytics forum.

Rob