Show Leaderboards in Game Center crashes most of the time

Hi Brent,

Yes, I just built the GameCenter app and deployed it to my same device. It worked flawlessly when I show the leaderboard. I tapped until it got to well over 10,000 points and still no crashes. Restarted app, tried it again. Still all good.

Mine worked once or twice showing the leaderboard, then it started crashing after that. I get the leaderboard for the app open, but then when I choose a leaderboard (I only have one), that’s when it summarily quits.

David

Hi David,

That is odd (but potentially a good sign?). Note that our test app uses Apple’s “GKTapper” test environment. Perhaps your leaderboard(s) are set up differently in iTunes Connect? Or perhaps it’s really a core Game Center issue that affects other apps that use real leaderboards (not Apple’s test sandbox).

Brent

On that note, I think you can actually test our sample app with your own Game Center account (however, the UI may get all messed up if you have like 10 different leaderboards or something). Just go into the project’s “build.settings” file, change the value for “CFBundleIdentifier” to your GC account, and re-build the app.

Brent

Well, it’s weird that my other app, which is live, uses the live leaderboard and it works fine. The difference between that one and my current one is that the old one uses a time-based scoring system (where lowest is best) whereas my current one is integer-based in which highest score is best. That one is not yet live…just in testing.

There was a change from iOS 8 to 9 where you had to have sandbox enabled on the device to test GC. There were warnings about using your “real” GC persona for testing, so I avoided that. The sandbox has gone away and it appears to accept any Apple ID now for testing. But any ID I use exhibits this behavior. 

I’ve gone in and tried to confirm that I’ve not done anything boneheaded in my iTunesConnect when setting up my GC leaderboards. If anything, it’s a lot simpler than the previous one I set up.

David

I tried replacing the CFBundleIdentifier in the Game Center to my app’s ID and it worked just fine when showing the leaderboard (there is only 1). I tried swapping the CFBundleIdentifier in my own app to point to com.apple.GKTapper within my app, and THAT worked too.

I hadn’t specified a CFBundleIdentifier in my build.settings before…wasn’t aware that I needed to (maybe not?) Anyway, I pointed the CFBundleIdentifier in my app to my own, built it, but it still crashes when I show the leaderboard. I’m at a loss right now. I was thinking it was my leaderboard in iTunes Connect, but now I’m thinking it isn’t, since my leaderboard works fine in your app. :confused:

David

Interestingly enough, I find when I deploy my app for the first time on the device and then go directly into the leaderboard, I am able to show it without a crash. For some reason it’s showing a score that I thought I’d wiped form the leader board. :confused:

But when I play the game and the show the leaderboard in the middle of the game (or after it’s over, it crashes. Hmmm…

David

OK, so I just realized that “delete test data” isn’t an immediate thing. I’m going to wait to see if that data gets wiped in the next day and then try re-testing.

Are you testing on an iPad or iPhone?

I installed same code base on my sons iPad and the leaderboard always loads. On my iPhone with same code base the leaderboard never loads.

Both devices are iOS 9.1

It happens on both my iPhone 6S and my iPad Mini.

David