32

I am trying to implement Game Center in my game. I've tried it on the iOS 8 GM. I'm not able to get the authentication to work on device, but it works fine in the simulator. I'm using the code provided in Apple's documentation.

Do other people have the same issue? Any advice?

Jesse Rusak
  • 56,530
  • 12
  • 101
  • 102
user2724028
  • 594
  • 2
  • 8
  • 19
  • Can you post the code you're using, or a link to it? What error message are you getting, if any? – Jesse Rusak Sep 17 '14 at 13:10
  • it got this message : Domain=GKErrorDomain Code=15 "The requested operation could not be completed because this application is not recognized by Game Center." UserInfo=0x17d08ee0 {NSLocalizedDescription=The requested operation could not be completed because this application is not recognized by Game Center.} – user2724028 Sep 17 '14 at 13:24
  • Have you tried other solutions for that error? http://stackoverflow.com/questions/24045244/game-center-not-authenticating-using-swift – Jesse Rusak Sep 17 '14 at 13:25
  • this is not very help full in my case, because i use Objective-C. I checked the return and everything is fine in my code, and it works in the simulator. – user2724028 Sep 17 '14 at 13:47
  • 2
    Have you tried the second answer on the page I linked to? 'The solution (discovered through Apple's Dev forum) was to go to "Settings" on the device, and then into "Game Centre" and enable "Sandbox" under the developer section.' – Jesse Rusak Sep 17 '14 at 13:49
  • Have you enabled Game Center in iTunes Connect? – Lior Pollak Sep 17 '14 at 13:59

3 Answers3

98

Happened to me as well in iOS8enter image description here. Just need to enable Sandbox in Settings--> Game Center --> Sandbox.

user1872384
  • 6,886
  • 11
  • 61
  • 103
  • 2
    Why is this happening? Because is not signed with AppStore provision? I have a build signed with release provision (ad-hoc), Game Center is enabled in itunesconnect, the AppID I use has Game Center enabled for dev and release. Is it going to work without Sandbox if we release the game? – Evgeni Petrov Nov 13 '14 at 13:23
  • I don't have the `Sandbox` option box in this setting. Do you know why? – jayatubi Aug 19 '15 at 08:14
  • @jayatubi Sounds like you might be using the simulator? The simulator is always sandboxed. – Invalid Memory Aug 25 '15 at 15:38
  • I am using the iOS 9 beta. Maybe this is a developer preview version so the sandbox is also always enabled. – jayatubi Aug 25 '15 at 15:41
6

In order to make it works you must be sure that:

  1. The SandBox Mode it's Enable on your device
  2. Your bundle id on Xcode must be the same bundle id on Itunes Connect
  3. You have to enable the Game center on itunes connect: Itunes Connect Game Center

enter image description here

Max_Power89
  • 1,710
  • 1
  • 21
  • 38
2
  1. Go to itunesconnect website (https://itunesconnect.apple.com)
  2. Open Your app. (in My apps section)
  3. Find "Game Center" tab. Click it.
  4. Then click on switch "Enable/Disabled"
Tomas M
  • 154
  • 2
  • 7