Game Development Community

Game Center works in Sandbox, but not in release

by Conor O'Kane · in iTorque 2D · 02/16/2012 (9:01 pm) · 6 replies

I've got Game Center working nicely in my app, the login appears when the app starts, and I can submit scores to and view the leaderboards. However this only works when I run it from XCode and view the developer or 'sandbox' leaderboards. With the released app (it's now live on the app store) Game Center doesn't even log in.

I'm not sure what to do - why would the functionality of the released app be different from the development one? There's no way for me to view the console or get any feedback from the live app. I have enabled Game Center for this version on iTunes Connect.

#1
02/16/2012 (9:14 pm)
Hey Conor,

I'm still in the sandbox, so I can't say for sure, but I see two places you need to check in iTunes Connect.

1.) Under your app information, go to the 'manage game center' button, and make sure game center is enabled for your app.

2.) On your app summary page, click view details for the version of the app in question, and make sure you see 'enabled for this version' in bright green next to the game center section.

#2
02/16/2012 (9:23 pm)
Thanks Ray, I've checked both of those. There's a leaderboard set up in the manage game center section, and this works fine in Sandbox. And I've got the green 'enabled for this version' icon in the latest version.

I don't think it's a Torque issue, as I can see Game Center working in Pokaire, which is also a Torque game.

I've tried contacting Apple but they don't reply to my requests. They initially rejected the app for not having any game center functionality, but then I modified the app description from 'Includes Game Center Leaderboards' to 'Includes Game Center Leaderboards (requires internet connection), assuming that they were probably testing it offline, and they approved it.
#3
02/17/2012 (7:48 am)
Hey Conor,

I have been playing your game, 'The Last Flight of the Bumblebee' (Very cool BTW!) both using my regular game center account, and with my sandbox login. I never get a game center message while your app is running.

I notice that when i start my app, i get a toaster popup saying that i logged into the game center sandbox. I can then exit my app, go to game center, verify that i'm in the sandbox, find your game in the list of 'games', launch it, the game starts, but never seems to log in....
I can then go back to my app, and the game center sandbox popup will show again, as it apparently logs back in when my app gets focus.

For me, every time I build, I have to go to my iTGB project, and verify that 'allow rotation' and 'enable game center' options are checked in the iOS sections of the iTGB project. They mysteriously reset themselves once in a while, along with the camera options.....

Best of luck, let us know how it works out!


#4
02/17/2012 (10:11 am)
@Ray - A good trick in Xcode is to add the plist and other project setting files to the project, in a folder that will not build with the target. If you use a repository, you'll get the M icon if it is ever changed.
#5
02/18/2012 (11:31 pm)
Ray - I checked and 'enable game center' was enabled in the latest build. I haven't seen that turn off, although I have seen the resolution change randomly while developing.

I see the same behavior as you - no Game Center login notification when I run the version on the app store, but if I run from Xcode it notifies me of login and then displays the leaderboard button, allowing me to view the sandbox leaderboards. I put code in the game to disable the leaderboard button if the user wasn't logged in to game center (because Apple rejected the app saying the leaderboard button was bugged).

I really can't see why the released app should behave differently to the development one. And the fact that it shows up in the list of game center enabled games makes it more confusing.
#6
11/08/2012 (6:17 pm)
Figured this one out finally... in the Preprocessor Macros, you have to add $(IT2D_Editor_FLAGS) to the Shipping target. This macro includes the TORQUE_ALLOW_GAMEKIT flag.