0

I am implementing game center leaderboard to my game and would like to use the leaderboard data to influence the gameplay.

My question is how to add fake data with different playerID into my sandbox game center so that I can test my feature.

I tried run the game both on simulator and device with different sandbox game center account, but I don't understand why, they can only see "ME" in the leaderboard, not as expected seeing two different players.

Then I tried switch different game center accounts on the same device, but same problem, there is only "ME" on the leaderboard.

I have been googling this issue for a while but cannot find anything related.

To clarify my purpose again at the end, I just want to find an easy way to add fake data in my sandbox leaderboard so that I can test my feature, pretty much it. :P

Thanks for helping out! :D

zeroliu
  • 990
  • 2
  • 10
  • 15
  • Have more than one sandbox account on the game center. Befriend them, have a score on each account, then they'll see each others score. – Desdenova May 15 '13 at 07:50

2 Answers2

0

I don't believe it's possible to do that. What you can do is put fake data into your app. Define a protocol that lets you get players and their scores (or positions in the leaderboard, if that's what you need). For testing, supply a class that conforms to the protocol, that uses test data. In the wild, switch this for a class that gets its data from Game Center.

0

Game Center seems quite flaky when it comes to running on a device and on the simulator - when testing challenges they very rarely get through between the two. It's also not very good at recognising user changes on the same device. From my tests it seems much more reliable if you have two or more actual devices running the game when testing Game Center features.

Lewis Gordon
  • 1,711
  • 14
  • 19