Unable to sign in Sandbox gamecenter on iOS 7

后端 未结 4 2162
孤独总比滥情好
孤独总比滥情好 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.

提交回复
热议问题