I'm building an iPhone game that supports Game Center (GC). When the app launches, I try to authenticate the local player...
if([GKLocalPlayer localPlayer].authenticated == NO)
{
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error)
{
[self callDelegateOnMainThread: @selector(processGameCenterAuth:) withArg: NULL error: error];
}];
}
Everything seemed to be working well. If the user wasn't signed into GC when the app launched, the app would display a dialog box giving them three options...
This is the desired behavior, but while I was testing, I clicked the "Cancel" option and now the authentication process errors out every time with the following error "The requested operation has been cancelled." Even when I delete the app and reinstall it, it still errors out and that dialog box never pops ups now.
Does anyone know why this is happening or how I can fix it?
Thanks in advance for your wisdom!
Game Center also checks whether you configured your game for Game Center. To authenticate the user, set the authentication handler ( authenticateHandler ) on the shared instance of GKLocalPlayer that represents the player of your game as in: GKLocalPlayer. local.
iOS 10 removed the game center app and it cannot be downloaded. You can still access your account and settings in Settings->Game Center, And for friend management and invitations it must be done through the Games that support it and the Messages App.
It turns out that is apple undocumented behavior.
After 3 times a user press cancel in a row, he has to go to the Game Center app and connect from there.
Go Figure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With