The problem is strange. My system version is IOS7. Everything goes fine on ios7 simulator. However, when I try authenticate on my iphone, the error in the callback block is always "GkErrorCanceled: the requested operation has been canceled or disabled by the user".
Even if I've already logged in game center, the error still pops.
I tried google the problem, and find someone on stackoverflow had conquered the issue:
iPhone Simulator 6.0 not able to connect to gamecenter in sandbox mode.
I tried following the way, however, it didn't work for me. I don't know if I did anything wrong.
Could some one give me a more detailed solution on this issue?
Thanks a lot!
Update: This issue appears to happen in sandbox only.
Got this problem too, and here what I've figured out:
GameCenter shows prompt for login only a few times (3-5), if all prompts were canceled - GameCenter becomes disabled for this app.
In iOS 7 there is a problem: GameCenter disabled state remains even if you login into the GameCenter app itself - application will still receive kind of this error:
error: Error Domain=GKErrorDomain Code=2 GkErrorCanceled: the requested operation has been canceled or disabled by the user
There are two workarounds:
First:
Second (this one helped me):
Both workarounds are not a viable option for production - I hope there will be a fix from Apple soon.
Most of the info is from to this discussion.