I have been searching for a few days now an cannot find a thing.
I have an ipod touch 4g and have just started adding Game Center to a game i'm working on.
This works fine in the simulator, but when i try to test on my device (running the app in debug mode), the game isn't recognised by Game Center.
I've seen on other forums that i should be in sandbox mode, but i cant seem to enter it on my device.
Please could someone tell me how to enter SB mode
Thanks
From the iOS Provisioning Portal:
In order to utilize the Game Center
Sandbox for testing, you must also
create a new Game Center Test User
account in the Game Center application
on your device.
All explicit App IDs are automatically
enabled for In App Purchase and Game
Center. Wildcard App IDs and
duplicates of existing explicit App
IDs are ineligible for In App Purchase
and Game Center.
Basically there are two steps:
- On a development enabled iOS Device, create a new Game Center account.
- You must sign your app with an App ID in the form com.yourcompany.yourappname, you can't simply use the wildcard development id/provisioning profile (in the form com.yourcompany.*) because Game Center won't recognize your app otherwise.
What you do is:
- Log out of Gamecenter.
- Run you app on the device (or the simualtor)
- When it asks you for your account details in your app, create a new account. That will be a sandbox account.
It helps to create the sandbox account in the sim first, just to be sure you aren't really create a Gamecenter account.
To be fully sure of creating a sandbox account, run Gamecenter on the simulator and create an account there.
It seems this whole process is simpler now in iOS 8. All I had to do was go to Settings
-> Game Center
and under the Developer
section, enable Sandbox
. At that point I was able to use Game Center in the development build of my game with my personal account and also with a sandbox account just fine.
Had the same problem. This worked for me:
1. log out GC, UNINSTALL APPSYNC if your're jailbroken, kill all processes.
2. create adhoc build, sign it with an appropriate entitlement, upload to your webserver, whatever.
3. download/install this ipa to your device and run, when asked create new account, or use existing - it will be registered (or created if new) inside sandbox.
Although what Kendall explains used to work in the past, from iOS9 it seems you have to create the sandbox accounts from iTunesConnect.
iTunesConnect -> Users And Roles -> Sandbox Testers
- Click on the (+) icon to create a new user.
- Start your app from XCode, and when prompted, use the sandbox e-mail account and password.
- Follow prompts to create the Game Center account.
The simplest fix that should work for many people is as follows:
- Close any Game Center enabled games
- Open up Game Center
- If you're logged in to a sandbox account, log out
- If not, create a dummy sandbox account, then log out once done
- Restart Game Center
- Try to log in using your real account, that may fix things
- If not, make sure you're logged out, then quit Game Center
- Start a Game Center enabled game, and try to log in your real account