Hi you all, I have followed the tutorial that can be found @ https://coronalabs.com/blog/2012/01/17/tutorial-game-center-integration-ios/ to integrate the Game Center in my game.
The code I’m using is:
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 )
and I always get “Fail, User is not logged into Game Center”.
Of course I have enabled the Game Center in iTunes Connect.
Then, I would like to show the leatherboard, that I have setted up via iTunes Connect.
According to the Corona documentation, the code I have to use is:
gameNetwork.show( "leaderboards", { leaderboard = { category = "com.appledts.EasyTapList" }, listener = onGameNetworkPopupDismissed } )
but what does “category” stand for? Is it the leatherboard ID?
Thanks.