Я создал небольшое приложение, чтобы проверить Game Center. Я вхожу в аккаунт и могу увеличить счет, но когда я смотрю на таблицу лидеров, там ничего нет
вот мой код
- (IBAction)increaseScore:(id)sender {
currentScore+=4;
scoreLabel.text=[NSString stringWithFormat:@"%i",currentScore];
}
- (IBAction)showLeaderBoard:(id)sender {
GKLeaderboardViewController *leaderBoardController = [[GKLeaderboardViewController alloc]init];
leaderBoardController.category=@"1";
leaderBoardController.timeScope=GKLeaderboardTimeScopeAllTime;
leaderBoardController.leaderboardDelegate=self;
[self presentModalViewController:leaderBoardController animated:YES];
}
- (void)leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController
{
[self dismissModalViewControllerAnimated:YES];
}
- (IBAction)sumbitScore:(id)sender {
GKScore *scoreReporter = [[GKScore alloc]initWithCategory:@"1"];
//@"1" is the leaderboard ID
scoreReporter.value=currentScore;
[scoreReporter reportScoreWithCompletionHandler:^(NSError *error) {
if (error) {
NSLog(@"submit failed");
}else{
NSLog(@"access granted");
}
}];
}