I'm having problems launching Game Center.
My application only works on iOS 6 and above, and I use the standard code for authentication with Game Center:
GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error) {
With this code, the application works beautifully and without problems for several weeks, for itself during development and with ~ 10-15 beta testers in special distributions.
For most of this time and for most users, the application behaves as you would expect: if you did not log in to Game Center when you started the application or did not log into your Game Center account, the application will offer you (with the modal Game Center-themed View Controller ) to log in with your Sandbox account. You log into your sandbox account and everything just works.
For a few users, however, something very strange started.
The authenticateHandler code is called, error is nil , but [GKLocalPlayer localPlayer].authenticated is NO , and the user is not logged into Game Center. Most importantly, there is no Game Center modal dialog box to prompt a user to log in. The application just starts, the authenticateHandler code is called, but authentication is not performed. I think the application will work if the Game Center application allows me to log in to my account in the sandbox, but this is not so: logged in or logged out of my Game Center account, there is no option to log in to the sandbox.
Since this only happens with some users and has just begun for my development device, I doubt very much that this is a problem with my code, and I assume that this is a complicated interaction between iTunes Connect, training profiles, the game Central settings and history on the device, etc. .d.
The game center is included in our app ID and in iTunes Connect (and app IDs for both matches).
Help!
Edit
My problem might be similar to iOS Development: a strange problem with Game Center user authentication . The solution proposed for this issue was to manually enter the Game Center application. This seems like a reasonable solution, but I need to enter the sandbox environment, and I cannot find a way to get an invitation to enter the Sandbox Game Center in the Game Center application.