[RESOLVED] Game Center unavailable - User is not signed into Game Center

Sorry if this has been posted before, but I’m running what is basically the code from the Game Center API doc page sample and using a developer provisioning profile (XCode sim and device) I constantly get the Game Center unavailable error. Here’s my code:

-- called after the "init" request has completed local function initCallback( event )     if event.type == "showSignIn" then         controller.gameboard:pause()     elseif event.data then         loggedIntoGC = true         if (controller.isdebug) then native.showAlert( "Success!", "User has logged into Game Center", { "OK" } ) end     else         loggedIntoGC = false         if (controller.isdebug) then native.showAlert( "Fail", "User is not logged into Game Center", { "OK" } ) end     end end function controller:system( event ) print('event.type', event.type)     if (event.type == "applicationStart") then         gameNetwork.init( "gamecenter", initCallback )         analytics.logEvent( "StartApp" )     elseif (event.type == "applicationExit") then         -- save state, options         controller.options:appExit()         controller.gamestate:appExit()         analytics.logEvent( "ExitApp" )     elseif (event.type == "applicationSuspend") then         -- save state, options         controller.options:appExit()     elseif (event.type == "applicationResume") then         gameNetwork.init( "gamecenter", initCallback )         if (controller.gamestate.playState) then             controller.gameboard:pause()         end     end     return true end Runtime:addEventListener( "system", controller )

I would love suggestions or a common solution, if anyone has one to give.

Thanks,

Matt.

Is it possible that the system start event  is firing too soon before the app is ready?  I never do my initing of things like that in side that event handler.  I just put it in my main.lua’s main chunk.

Thanks.

That code is at the bottom of my main.lua and has been running just fine until I added the game center init. I’ll try delaying it.

Although, having said that, the system event listener does say to call it there:

http://docs.coronalabs.com/daily/api/library/gameNetwork/init.html#example

The other problem is that when I run in the XCode sim and open the Game Center app, my user shows with “Sandbox”.

Recently, I was seeing my game able to show GC dialogs, etc, but just last night it stopped - and at the same time the GC app started showing up with “Sandbox”. That’s the change that I’ve noticed. Of course, I don’t think I’ve done anything to affect this change, so what causes “Sandbox” to appear?

I don’t understand why but it turns out that switching from one App ID to another has resolved the problem. As far as I can tell, both IDs are configured the same way, so perhaps I was using one incorrectly. Anyway, GC now opens just fine. My advice for this problem is to really check your iOS settings in the provisioning profile etc.

Is it possible that the system start event  is firing too soon before the app is ready?  I never do my initing of things like that in side that event handler.  I just put it in my main.lua’s main chunk.

Thanks.

That code is at the bottom of my main.lua and has been running just fine until I added the game center init. I’ll try delaying it.

Although, having said that, the system event listener does say to call it there:

http://docs.coronalabs.com/daily/api/library/gameNetwork/init.html#example

The other problem is that when I run in the XCode sim and open the Game Center app, my user shows with “Sandbox”.

Recently, I was seeing my game able to show GC dialogs, etc, but just last night it stopped - and at the same time the GC app started showing up with “Sandbox”. That’s the change that I’ve noticed. Of course, I don’t think I’ve done anything to affect this change, so what causes “Sandbox” to appear?

I don’t understand why but it turns out that switching from one App ID to another has resolved the problem. As far as I can tell, both IDs are configured the same way, so perhaps I was using one incorrectly. Anyway, GC now opens just fine. My advice for this problem is to really check your iOS settings in the provisioning profile etc.

I had Game Center working fine, but have been switching accounts for IAP testing.  I’m actually not even sure what account was originally working with my Game Center testing (sandpit)

But now I’m hitting this issue.  I’ve logged out of Game Center itself on the IOS device, but when I run my app it doesn’t give me a chance to create a user account in the sandpit, I just get “Game Center Unavailable - Player is not signed in”.  

Could this be that the sandpit environment is down?  I can’t really even try to switch accounts in the app?  (unless you mean switch accounts in the Settings-GameCenter area, however I thought we had to be logged out of this area for testing)??

Posted my issue in new post here:  http://forums.coronalabs.com/topic/40749-game-center-unavailable-player-is-not-signed-in-gamenetworkinit-wont-give-me-a-chance-to-login-to-test/

I had Game Center working fine, but have been switching accounts for IAP testing.  I’m actually not even sure what account was originally working with my Game Center testing (sandpit)

But now I’m hitting this issue.  I’ve logged out of Game Center itself on the IOS device, but when I run my app it doesn’t give me a chance to create a user account in the sandpit, I just get “Game Center Unavailable - Player is not signed in”.  

Could this be that the sandpit environment is down?  I can’t really even try to switch accounts in the app?  (unless you mean switch accounts in the Settings-GameCenter area, however I thought we had to be logged out of this area for testing)??

Posted my issue in new post here:  http://forums.coronalabs.com/topic/40749-game-center-unavailable-player-is-not-signed-in-gamenetworkinit-wont-give-me-a-chance-to-login-to-test/