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!
- 1
- 1
- 175
- 1
- 1
- 9
-
I think you have cancel game center login dialog 3 times. Same thing is happening for me too – Rahul Patel Sep 24 '13 at 07:59
-
Anyone have a fix for this? – Stephen Sep 26 '13 at 21:09
-
It happend to me too, and on a device with iOS 6 it asks me to login to game center but on a device with ios7,on which i have canceled it a few times i get the same error message as you do. – dave Sep 27 '13 at 10:35
-
1You just need to go to settings -> login to game center. -> launch your app. (you'll see the login banner on app launch). go to settings again -> logout from game center -> launch your app -> you'll be able see the game center login =). – user1872384 Mar 20 '14 at 06:45
2 Answers
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:
- Log out of Game Center through the Settings app.
- Reset all settings
- After the device rebooted, launch app with development build. After launch the GC Login viewController pops up.
Second (this one helped me):
- "Erase All Content And Settings".
- Set up as a new device - do not restore from any backups.
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.
- 5,420
- 4
- 26
- 24
-
1I found that this issue is only with sandbox. In live it is working fine. – Rahul Patel Oct 10 '13 at 09:02
-
I also found that when user press disable button, no any event or method fires. Not even authantication block return anything. – Rahul Patel Oct 11 '13 at 04:42
-
-
Settings > General > Reset > Reset All Settings
(i read this somewhere but if the user has to do the same its not a good solution) (i did this for a app that i am testing , not a app gone live on the App Store) i tested for a n app from the appstore(not mine) and i couldnt reproduce the problem i mean after i logged back from settings i was logged back in that app.
But for app i am testing, only reseting worked . I just saw a new ios update is available maybe that will fix it .
- 281
- 2
- 9
-
This works, but keep in mind you need to reenter your wifi password if you aren't connected to a mobile network with your test phone. Otherwise gamecenter won't show up when you run your app. Resetting your phone removes wifi password. – NJGUY Sep 03 '15 at 01:38