In a game I am developing using GameCenter, I want to handle the following scenario:
I couldn't find a good answer for this either, so I decided to just replicate the message once the I start getting the cancel error. This is still in development but it basically changes the button callback to display the error alert rather than display the leader-board.
Just a note, not sure if this will be approved or not since I am replicating an Apple error message.
-(void) gcLogin: (id) sender {
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
if(error) {
if([[error domain] isEqualToString:GKErrorDomain] && [error code] == GKErrorCancelled) {
[ResourceManager showAlertWithTitle:@"GameCenter Disabled" message:@"Sign in with Game Center application to enable"];
mGameCenterCancelled = YES;
}
NSLog(@"%@", [error description]);
} else {
[self updateMenu];
mGameCenterCancelled = NO;
}
}];
}