34

Since iOS 7 I no longer get the prompt from game center to ask me to log in sandbox mode when I open my application. I searched for a while and never saw any known issues about this and there are no patch notes that says anything about sandbox mode changing. Has anyone encountered this problem?

DogDog
  • 4,820
  • 12
  • 44
  • 66
  • I have the same problem. Funny thing is, with the same account on everything (iCloud GameCenter etc.) on two different devices, only one is not possible to login. – Binarian Oct 14 '13 at 11:16
  • 1
    any update re whether Apple will fix this behaviour? – Greg Nov 10 '13 at 03:51

4 Answers4

56

If you've cancelled game center sign in enough times, the OS disables game center for that game. Prior to iOS7, you could manually sign in again using the game center app, and when you launch your game again it would sign in.

However, in iOS7, it appears that when the OS disables game center for your game, it's completely disabled. I've found that using Settings > General > Reset > Reset All Settings will restore game center functionality for games that have been disabled in this manner.

Greg
  • 33,450
  • 15
  • 93
  • 100
  • I up-voted this too quickly. I'm having this exact problem (I canceled out of GC to test non-GC enabled workflows) and now I can't log in again. However, the stated solution doesn't work for me - I've logged out of GC, deleted my app, reset settings, then installed my app again and still no login. This is blocking my work, does anyone have any hints? – Kris Giesing Oct 11 '13 at 04:18
  • I didn't need to delete my app before resetting all settings. Have you tried leaving your app on the device and resetting all settings? – Greg Oct 14 '13 at 16:14
  • 4
    So, I answered my own question. The settings reset wiped out my WiFi settings as well (duh). The failure mode for not having a network and the user canceling GC login is identical within the GC callbacks; it wasn't until I looked at other parts of the device state that I realized what I had done wrong. Once I enabled WiFi again, I got the GC login dialog as expected. – Kris Giesing Oct 15 '13 at 11:36
7

Copied answer from here: https://stackoverflow.com/a/19291001/1321401 - a bit different question caused by the same issue.

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:

  1. Log out of Game Center through the Settings app.
  2. Reset all settings
  3. After the device rebooted, launch app with development build. After launch the GC Login viewController pops up.

Second (this one helped me):

  1. "Erase All Content And Settings".
  2. 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.

Community
  • 1
  • 1
Luten
  • 5,420
  • 4
  • 26
  • 24
  • It does not happen in Production. – DogDog Oct 15 '13 at 13:11
  • @DogDog Yes, "This issue appears to happen in sandbox only." "Not a viable option in production" - cause it is not comfortable for Q&A sandbox checks. – Luten Oct 16 '13 at 05:59
6

I thought I was trapped in this situation as well. I constantly got the GKErrorCancelled when the game I develop tried to log me into to the Game Center sandbox. I then went to the Game Center application, and started my game through Game Center. Then, magically, I was successfully signed in. No idea if it was just a coincidence, but maybe this can help someone else who doesn't want to reset the device.

empee
  • 151
  • 1
  • 8
  • 1
    I tried do to this, but couldn't because my app wasn't listed in Game Center. However, then I tried issuing a multiplayer invitation from another device. The invitation arrived and I accepted it, the title was launched and the Game Center sign in occurred. Device reset avoided. – Columbo Jan 13 '16 at 09:27
2

Seems there's been some change recently to work around this. Maybe in iOS7? This answer to a similar question https://stackoverflow.com/a/21231537/11801 suggests:
- quit your app
- use the settings page for gamecenter to log into your sandbox account, then log back out
- open your app and you should now be able to log in

Community
  • 1
  • 1
tenpn
  • 4,556
  • 5
  • 43
  • 63