问题
I am having trouble getting game center to work with my app.
Whenever I try to authenticate the user it comes back with the following error:
"The requested operation could not be completed because this application is not recognized by Game Center."
Most of my internet searches have yielded the response "Make sure that Sandbox is enabled" but with the new iOS 9 there is no sandbox anymore. I also have made sure that my Bundle ID and all of my certificates are correct so I don't think that is the problem. Thanks in advance!
Michael
回答1:
Adding a leaderboard fixed the problem even though I wasn't using the leaderboard.
回答2:
Did you enable Game Center in the project's capabilities?
Have you added the app in iTunesConnect?
Have you uploaded a build to iTunesConnect? If so, a good check to validate the that your setup is correct is to go to Activity | All Builds | ~your current build~, then scroll down to Required Capabilities. Does it list "gamekit" in that section?
The latest answer to the game is not recognized by game center suggests that if everything else is correct, just adding an achievement (or maybe a leaderboard) cleared the issue.
Edit: since writing this, the problem has appeared a few times for me. Creating a dummy leaderboard solved it the first time. Creating yet another solved it the second time. The third time it happened, just changing which of the dummy leaderboards was the default solved the problem.
Edit 2: Based on How to list all available GKTurnBasedMatches for a player?, it appears that in some cases, at least using Swift, you don't even get the "unrecognized" error. Operations just silently fail until you create a leaderboard.
回答3:
There is a toggle switch in appstoreconnect.
In your "Prepare for submission" tab, toggle this switch:
回答4:
I solved this by creating a new leaderboard in iTunes Connect
回答5:
Has happened to me when building from the enterprise target of the app instead of the release. The two bundle IDs are different so Game Center won't work because only the release bundle ID is registered with iTunes Connect (for Game Center).
来源:https://stackoverflow.com/questions/34055758/ios9-this-game-is-not-recognized-by-game-center