La tabla de clasificación de Game Center dice "No hay tablas de clasificación"
Frecuentes
Visto 229 equipos
1
I try to show the leaderboard for my game with Game Center. When I click on the Game Center Button in my game the following is called:
- (void)showGameCenterButtonPressed:(id)sender {
{
if ([GKLocalPlayer localPlayer].authenticated == NO) {
UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"You must enable Game Center!"
message:@"Sign in through the Game Center app to enable all features"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[message show];
} else {
GKGameCenterViewController *gameCenterController = [[GKGameCenterViewController alloc] init];
if (gameCenterController != nil)
{
gameCenterController.gameCenterDelegate = self;
gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards;
gameCenterController.leaderboardIdentifier = @"MyScore";
UIViewController *vc = self.view.window.rootViewController;
[vc presentViewController: gameCenterController animated: YES completion:nil];
}
}
}
}
I also have a report Score method:
-(void)reportScore {
if ([GKLocalPlayer localPlayer].isAuthenticated) {
GKScore *scoreReporter = [[GKScore alloc] initWithLeaderboardIdentifier:@"MyScore" forPlayer:[GKLocalPlayer localPlayer].playerID];
scoreReporter.value = _highScore;
NSLog(@"Score reporter value: %@", scoreReporter);
[GKScore reportScores:@[scoreReporter] withCompletionHandler:^(NSError *error) {
if (error != nil) {
NSLog(@"Error");
// handle the reporting error
}
}];
}
}
Now the Game Center window slides up, shows the gametitle, but says "No leaderboards"
I thought this might be an iTunes Connect issue.. The Bundle Identifier is correct though and Game Center is enabled. Any idea on that? Thanks so much!
0 Respuestas
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas ios7 sprite-kit game-center game-center-leaderboard or haz tu propia pregunta.
Did you create a corresponding leaderboard in iTunes Connect? - CodeSmile
I created a leaderboard in the "Manage Game Center" Section. Can you confirm that there must be an iTunes Connect Problem rather than in my methods? - Elio_
@user3488081, you got solution for this problem ? for me also something happened - Guru
Any solution?? everything is working in sandbox mode though - Alejandro Vargas