Unable to sign in Sandbox gamecenter on iOS 7

后端 未结 4 2155
孤独总比滥情好
孤独总比滥情好 2020-12-09 15:06

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 ab

相关标签:
4条回答
  • 2020-12-09 15:32

    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.

    0 讨论(0)
  • 2020-12-09 15:34

    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

    0 讨论(0)
  • 2020-12-09 15:44

    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.

    0 讨论(0)
  • 2020-12-09 15:47

    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.

    0 讨论(0)
提交回复
热议问题