Native Game Center Tutorial

@robmiracle so your saying I’m supposed create a new account for GameCenter right? [import]uid: 17058 topic_id: 20394 reply_id: 80491[/import]

To test game center, you must log out of any live game center accounts (and you have to have a game center account to use their service).

You run your app with a developer provisioning profile or an ad-hoc distribution profile and your app will automatically be connected with Apple’s testing environment (sandbox). You will need to create an account to login to the test game center from your app via the game center app.

Once that is done, and your code is working and submitting scores, then you need to log out, launch your app, create a 2nd game center account in the test environment, save a score from it. After that you should be good to go.

Once you’ve live, you would want to use your regular game center login. So having multiple email addresses is helpful!
[import]uid: 19626 topic_id: 20394 reply_id: 80493[/import]

@robmiracle I tried everything you said and still nothing I don’t know if I submitting the score right in gamecenter. If you don’t mind and check on my forum you where helping me on. I did everything made a new account within the gamecenter simulator sandbox, and also tried my game on developer mode and still nothing even log out and in. I have a feeling is the code must be wrong. [import]uid: 17058 topic_id: 20394 reply_id: 80495[/import]

Thank You @blasterv I successfully tested this today.

One frustrating thing was that scores and achievements were being posted but were not viewable. I added 2 test users but could see only one leaderboard score and only on one account.

But everything worked as expected when I sent a friend request from one test user to the other and accepted the request.

so to add to @robmiracle

  1. Log out of your Live game center account using the game center app
  2. Run Your app with Developer or Ad-hoc provisioning profile
  3. In the Game center popup choose create New account and create one using an alternate email other than your live one on game center. The popup says it is in sandbox mode.
  4. Play game and submit score/achievement
  5. Logout the test user via game center app
  6. Repeat steps 2,3,4 and create another test user and submit scores
  7. Send a friend request to the first test user and accept the request by logging in as that user. This is very easy if you have 2 devices, each logged in with a test account.
  8. Enjoy!!

Note: Remember to call authorize() after initializing game center before submitting scores it can be in done in your main.lua at game startup

[import]uid: 118171 topic_id: 20394 reply_id: 81546[/import]

@orcaweb
I haven’t created a new account yet.
But every time I play the test game (ad-hoc disti) logged into my regular game center aacount and go back to another released game then I had been logged out of my live game center.
I have to switch iPad off, switch on, open a released game and then login into gamne center via the Game Center app.

  1. Is this normal?
  2. Is the procedure you described still valid?
    thanks, Luciane [import]uid: 32063 topic_id: 20394 reply_id: 83393[/import]

@Luciane
Since your game is with ad-hoc dist., you will be automatically logged off from Live Gamecenter and logged into Sandbox and that is why you need to login into live game center when using released apps. Logging off and later Logging in using Game center app (tap on email id in game center app to get logout button) before you open released apps should not require you to switch iPad off.

Try the above steps by creating 2 test accounts using other email accounts. It still works for me.

[import]uid: 118171 topic_id: 20394 reply_id: 83635[/import]

Does GC automatically track which achievements have been unlocked? I just integrated GC into my app and the achievement banner appears everytime, even for achievements that have been unlocked already. [import]uid: 44127 topic_id: 20394 reply_id: 84780[/import]

No it does not. That’s by design. You can choose to give the user that feedback or not every time, as well as show the user checkpoints to an achievement (e.g. you are 50% done with an achievement!)

I tend to let GC tell the user every time, most users like positive feedback and to think they’re doing well :slight_smile: [import]uid: 36054 topic_id: 20394 reply_id: 84782[/import]

@Blasterv: Thanks for the tip! Looks like I’ll have to make my own achievement tracking system then. I used to integrate with GC via OpenFeint and I guess OF used to handle these. Now that I’m using stand alone GC, I guess I’m on my own. Serves me right. :slight_smile: [import]uid: 44127 topic_id: 20394 reply_id: 84886[/import]

My game is in Ad-hoc disti.
I know how to delete the leaderboard test data in iTunes Connect. But that does not clear the achievements.
How do we delete the achievements test data in iTunes Connect?
thanks, Luciane [import]uid: 32063 topic_id: 20394 reply_id: 85689[/import]