4

I'm using pretty straightforward code, modeled on the code in Strougo & Wenderlich, but wacky things are happening that I'm trying to figure out. A couple of them:

1) In the Game Center app on the device one game I bought from the app store (namely Temple Run) is showing up in the sandbox along with the game I'm trying to debug. How did that get there? I have several other app store games with game center features that don't show up so it isn't that everything on my device is showing up.

2) The game I'm developing has achievements and leaderboards. The code for submitting both seems to be working but only my achievements show up in the Game Center app. It says "No Leaderboards" instead of showing my leaderboards. However if I run the code that retrieves leaderboard information it works as expected and I get back my scores.

3) The game center app in the simulator doesn't say "No Leaderboards". It has leaderboards for my game but it says "No score". On the leaderboard detail screen it shows my rank as #1 of 1 friend and #2 of 2 players, and on the detail of that it shows the actual scores in my test game.

4) The simulator's game center app says I have no achievements even though the device's game center app shows the achievements correctly. Is the simulator's Game Center app simulating the Game Center Server and not communicating with the real Game Center server?

5) Do I count as one of my own "Friends" even though I didn't do anything to become a friend (to explain #3 above)?

6) The leaderboard screen on the device looked like it was working at first glance but I just realized that the scores it's showing are numerically wrong! What's with that? Maybe they're left over from yesterday or some other time?

RobertL
  • 14,214
  • 11
  • 38
  • 44

2 Answers2

1

1) Game Center accounts get stuck in sandbox mode sometimes, one solution is to log out from the Game Center application and log-in from the game (temple run in this case)

2) I'm having similar issues too, I think some has to do with sandBox accounts. For example I can't see any of the leader board scores uploaded when I send a score from just one device, as soon as a second device submits a score, they both appear in the leader board.

Also have you also enabled Game Center for the current version from iTunes Connect?

Kaan Dedeoglu
  • 14,765
  • 5
  • 40
  • 41
  • 1) Thanks for the suggestion. It sounds like a good thing to try but unfortunately it didn't help in my case. – RobertL Mar 14 '12 at 23:43
  • 2) At present I only have one device to test with (I have a couple of others but they aren't available for testing right now.) To answer my own question #1- I learned that any game I run while I'm logged into game center sandbox shows up in the sandbox from that point on. That doesn't fit my mental model of what the sandbox is, but that's how it seems to be working. Now I'm wondering how I can get back to a non-sandbox game center login. – RobertL Mar 14 '12 at 23:50
  • I did the same thing although that logging out and logging in from the non-sandbox game again works for me. I think this is the reason why Apple advises strongly that developers create new accounts for Game Center testing – Kaan Dedeoglu Mar 15 '12 at 00:20
  • What is a "Sandbox account" ? Some says this is an account created on Game Center App only for testing purposes. Others says this is a Test User account create in iTunes Connect ? These two words "Sandbox account" are on numerous discussions and comments seems to have never been defined ! – Dominique Vial Mar 21 '13 at 14:31
  • @Domsou Good question, however you should post that as a [new question on Stack Overflow](http://stackoverflow.com/questions/ask) instead of a comment. Also, take a look at this [documentation from Apple's developer site](http://developer.apple.com/library/mac/#documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/15_GameCenter/GameCenter.html) – Sam Spencer Jul 18 '13 at 04:02
0

I know this is old, but I found an answer that helped me, and might help someone else. Also the itunes connect changed a lot through time, maybe this answer is more relevant for recent problems. I hope the OP have fixed all his issues by now.

2) This one might do the trick. 2 test accounts. iOS Game Center: Scores not showing on leaderboard in sandbox

Even having one device you can have multiple test accounts with generics emails: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SettingUpUserAccounts.html#//apple_ref/doc/uid/TP40011225-CH25-SW9

This answer is more about the 2 question that helped me. But for the other ones:

1) It happened with me too. I don't know if it was because the app were open when I logged into Sandbox environment or if recent downloads apps might affect this somehow - anyways the apps show there; but it seem harmless.

3) I always hear to test on devices always, so I believe you shouldn't take simulator in consideration on this. And the answer of 2 might solve this issue as well.

4) Did you check inside the itunes connect if you have added the Achievements to the game? And I mean added, not just created. After creating you must insert them on the "Versions" tab, find the Game Center part, press "+" on Achievement. I always forget to add in-app purchases the same way.

5) As you said about "temple run" appears on your account out of the blue, maybe your test game appeared on your "not test account" somehow, but with no data GC data recorded on it.

6) Didn't understand well. Sorry about my english. A) They are like out of regular order (high to low), or B) the score itself is wrong? Like: you scored 7, but it shows a previous 5. A) This happens all the time and I figure the sandbox is a lil buggy. So I double check the high score on Player Preferences and when checking I always parse the value again. B) you can change the order of score displaying when creating the leaderboard.

https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/GameKit_Guide/LeaderBoards/LeaderBoards.html#//apple_ref/doc/uid/TP40008304-CH6-SW22

Every time I create a new game is a fight testing GC. Hope this helps anyone out there.

Community
  • 1
  • 1