views:

119

answers:

3

Hi Everyone,

I try to test Game Center in my iPhone game, but when i try to connect whit the following lines of code i get a alert that says "This game is not recognized by Game Center.".

[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
    if (error == nil)
    {
        // Insert code here to handle a successful authentication.
    }
    else
    {
        // Your application can process the error parameter to report the error to the player.
    }
}];

Now i've read many forums and look at the Apple documentation, but i can't find how i can enable the Game Center option at iTunes connect. I think i need to first add an application to "Manage application" and then enable the Game Center option. But how can i add an application only for testing?

Thanks for any help :)

A: 

Someone can help me? :(

iMuller
A: 

I added my app in itunes connect just for testing. I had to fill all of those forms and even add some screenshots (just empty pictures (any)). And only after that i was able to switch came center on for my app and add a leaderboard for it. But now I get another problem - I can't log-in/sign-in to the game center from my app - I get an exception every time. Bundle id in itunes and properties of my app is the same. I'm logged out from game center. I know that there must be a popup with title kinda Sandbox but I don't get it when I call [GKLocalPlayer localPlayer] authenticateWithCompletionHandler. Just usual game center pop-up. Anybody can help me?!

Evresh
Did you remove the app from your iDevice end put it back on it?
iMuller
A: 

I think the problem was in wrong cocos2d version. After moving to v0.99.5 game center started working.

Evresh