Hi,
I'm trying to call the authentication method of game center, however no authentication screen comes up and the callback return with an error : "the requested operation has been canceled".
If I move the app to the background and log into the gamecenter application, then go back to my app, log out of game center, and they try to log in again, then the auth screen does come up for a couple time.
However, after a few times in a row if I press cancel every time within the auth screen, the same error returns. (again,without even showing the auth screen again)
The code :
PHP Code:
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error)
{
NSDictionary *userInfo = nil;
if (error == nil) {
NSLog(@"Game Center successfully authenticated");
}
else {
userInfo = [NSDictionary dictionaryWithObject:error forKey:@"NSError"];
}
[[NSNotificationCenter defaultCenter] postNotificationName:Notification
object:self
userInfo:userInfo];
}];
Any idea what can cause this issue ?