Create a sandbox account on Game Center on iphone
Asked Answered
F

7

9

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

Flickertail answered 31/3, 2011 at 22:5 Comment(0)
K
8

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:

  1. On a development enabled iOS Device, create a new Game Center account.
  2. 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.
Kacikacie answered 19/4, 2011 at 1:1 Comment(3)
Hmmm, I already do this as soon as i start work on my apps (saves time). One thing i noticed in your answer were the words "development enabled iOS Device". What do i have to do to do this? From what i had read on other forums, running the app in debug mode should allow me to complete the steps.Flickertail
Development enabled iOS device is just the device that you're running your app on (xcode does some fancy stuff to enable the device for development the first time you plug it in and every time you update it). Looks like you've got a different problem then.Kacikacie
after nearly a year, this solution has decided to work on iOS5 but not previous versions.Flickertail
S
13

What you do is:

  1. Log out of Gamecenter.
  2. Run you app on the device (or the simualtor)
  3. 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.

Sylph answered 31/3, 2011 at 22:22 Comment(5)
Unfortunately this doesn't work. The app doesn't recognise that it should be in sandbox.Flickertail
I just altered the response to include the aspect of running Gamecenter in the simulator first, creating an account there - that may help you.Sylph
Even after creating an account in the simulator, the app running on the device still wont log me in with the test account.Flickertail
It should work - you might try asking over at the apple developer forums, in case any of the Apple engineers there have alternate suggestions. Post a response of your own if you find some additional information that gets it working for you...Sylph
I thought it would be the game in development that runs in sandbox, not the Game Center account itself?Discretion
K
8

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:

  1. On a development enabled iOS Device, create a new Game Center account.
  2. 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.
Kacikacie answered 19/4, 2011 at 1:1 Comment(3)
Hmmm, I already do this as soon as i start work on my apps (saves time). One thing i noticed in your answer were the words "development enabled iOS Device". What do i have to do to do this? From what i had read on other forums, running the app in debug mode should allow me to complete the steps.Flickertail
Development enabled iOS device is just the device that you're running your app on (xcode does some fancy stuff to enable the device for development the first time you plug it in and every time you update it). Looks like you've got a different problem then.Kacikacie
after nearly a year, this solution has decided to work on iOS5 but not previous versions.Flickertail
H
3

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.
Hearttoheart answered 7/2, 2016 at 17:20 Comment(0)
E
2

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.

Enrollment answered 29/4, 2015 at 17:3 Comment(2)
This should be in official documentation. Found this only here.Nerta
While this might work, it is against Apple's advice. From the documentation: "Important: Always create new test accounts to test your game in Game Center. Never use an existing Apple ID."Argillite
K
2

Sadly, Apple deprecated the sandbox environment for Game Center since iOS 9, see

As part of the release of iOS 9 and El Capitan, the Game Center development sandbox has been eliminated, allowing all pre-release development to occur in exactly the same server environment as released games.

Today, if we want to test with a new game center account, we need to create new apple ID with an actual email address for two factor authorization.

Keever answered 29/3, 2021 at 16:21 Comment(0)
V
1

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.

Venter answered 11/11, 2012 at 15:47 Comment(0)
F
0

The simplest fix that should work for many people is as follows:

  1. Close any Game Center enabled games
  2. Open up Game Center
  3. If you're logged in to a sandbox account, log out
  4. If not, create a dummy sandbox account, then log out once done
  5. Restart Game Center
  6. Try to log in using your real account, that may fix things
  7. If not, make sure you're logged out, then quit Game Center
  8. Start a Game Center enabled game, and try to log in your real account
Footprint answered 4/7, 2012 at 8:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.