I am trying to call the authentication method in the game center, but the authentication screen does not appear and the callback returns with the error: "The requested operation was canceled."
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 might cause this problem?
source share