I'm trying to make a game using Game Center and Swift with iOS. However, whenever I display my leaderboard, I'm getting a screen that says, "No Data Available." Also, my NSLogs say that the application is not recognized by Game Center. I had found online that I'm supposed to add my Game Center leaderboard ID in an asset info field, but I can't find it. Does anyone know how I can fix my problem?
4
-
You have to add your app to iTunes Connect, enable Game Center there and add your leaderboard.– AdamCommented Nov 15, 2015 at 2:37
-
Thanks for the answer. I've done this, but I'm only testing the app right now. How do I get my scores to show up in an Ad Hoc distribution?– kriskendall99Commented Nov 15, 2015 at 2:41
-
Enable Game Center for the new version of your app in iTC. That should fix the problem with your app not being recognized by Game Center.– AdamCommented Nov 15, 2015 at 2:52
-
It's enabled in both iTunes Connect and Xcode.– kriskendall99Commented Nov 15, 2015 at 3:04
Add a comment
|
1 Answer
I found the answer! All I had to do was change the bundle identifier from com.example... to the bundle ID used on iTunes Connect and now it works!
-
Not sure why someone gave you -1, but you are now back at 0. This was my issue. Unity had truncated the bundle id. Thank you! Commented Oct 11, 2017 at 11:43