I searched for the answer in several similar threads, but I could not find a suitable one for my problem.
I have it in viewDidLoad
self.currentLeaderBoard = [leaderboards objectForKey:[defaults objectForKey:@"Level"]];
if ([GameCenterManager isGameCenterAvailable]) {
self.gameCenterManager= [[GameCenterManager alloc] init];
[self.gameCenterManager setDelegate: self];
[self.gameCenterManager authenticateLocalUser];
} else {
NSLog(@"Current device doesn't support GameCenter");
}
I am trying to send an invoice like this:
NSLog(@"Category %@", self.currentLeaderBoard);
[self.gameCenterManager reportScore: 20 forCategory: self.currentLeaderBoard];
[self.gameCenterManager reloadHighScoresForCategory: self.currentLeaderBoard];
I also added this for a fix, but this did not help:
- (void) processGameCenterAuth: (NSError*) error
{
if(error == NULL)
{
[self.gameCenterManager reloadHighScoresForCategory: self.currentLeaderBoard];
NSLog(@"GAMECENTER OK");
}
else
{
UIAlertView* alert= [[UIAlertView alloc] initWithTitle: @"Game Center Account Required"
message: [NSString stringWithFormat: @"Reason: %@", [error localizedDescription]]
delegate: self cancelButtonTitle: @"Try Again..." otherButtonTitles: NULL];
[alert show];
}
}
But the effect is always the same:
2012-04-15 11:34:31.987 Colors[40146:1bb03] authenticateWithCompletionHandler: enter
2012-04-15 11:34:32.009 Colors[40146:1bb03] authenticateWithCompletionHandler: exit
2012-04-15 11:34:32.010 Colors[40146:1bb03] NORMAL MODE
2012-04-15 11:34:33.163 Colors[40146:1bb03] GAMECENTER OK
2012-04-15 11:34:33.368 Colors[40146:1bb03] Missed Method
2012-04-15 11:34:33.773 Colors[40146:1bb03] Category 2
2012-04-15 11:34:33.851 Colors[40146:1bb03] Missed Method
2012-04-15 11:34:33.989 Colors[40146:1bb03] Missed Method
As you can see, at the beginning of the application it says “Skipped Method”, as well as when I try to report the results. It does not report the results (I tried with two different accounts on the simulator) - nothing is displayed in the GC. Of course, I checked if the categories in iTunes Connect are configured correctly, and it looks like they are.
http://cl.ly/183a2A2p1M0A2k2c3U2B
Please tell me what I did wrong and how to fix it ... Thank you!