Game Center not getting initialized

I am trying to get my game to work with Game Center. I have followed the following blog tutorial and have been unsuccessful. http://blog.anscamobile.com/2012/01/tutorial-game-center-integration-ios/

[lua]local gameNetwork = require “gameNetwork”
local loggedIntoGC = false

– called after the “init” request has completed
local function initCallback( event )
if event.data then
loggedIntoGC = true
native.showAlert( “Success!”, “User has logged into Game Center”, { “OK” } )
else
loggedIntoGC = false
native.showAlert( “Fail”, “User is not logged into Game Center”, { “OK” } )
end
end

– function to listen for system events
local function onSystemEvent( event )
if event.type == “applicationStart” then
gameNetwork.init( “gamecenter”, initCallback )
return true
end
end
Runtime:addEventListener( “system”, onSystemEvent )[/lua]

When I run my app on my iPad device, nothing happens - no alerts show up at all on applicationStart. Seems that the callback isn’t even being fired.

I went into my apple developer provisioning and setup a new appID and made sure it was active. I did the normal setting up of the provision profile and got my provisioning file installed in XCODE’s organizer. Was able to install my app on my iPad.

Then I setup the app in iTunes Connect with the correct Bundle id - looks like this: com.company.appname. Game center is enabled in iTunes connect for my app.

The ID matches up in my provisioning file APP ID and in the iTunes connect app Bundle ID settings. In my Corona build settings “Code Signing Identity” is set to the same provisioning file that has the matching APP ID.

Everything should be working - but when I run my app, it does not show any popups saying “Success” or “Fail.”

Does anyone else have this issue with Game Center not firing the callback?

* I am a trial Corona user - don’t know if this has anything to do with this.

* Also, my app is in testing - it has not been submitted in the APP store - don’t know if this has anything to do with it either?

* Could there be a sandboxing issue on the device?

Any help would be appreciated. [import]uid: 129183 topic_id: 24439 reply_id: 324439[/import]

Hey there,

This is because native Game Center support was added since build 704, so it is currently only available to licensed developers who have access to daily builds. (You would want to use build 732.)

This is mentioned in the first paragraph of that blog post you linked to. (It says 725 but there was a bug there, 732 resolves it.)

Hope this helps.

Peach :slight_smile: [import]uid: 52491 topic_id: 24439 reply_id: 98961[/import]