Add Game Center leaderboards and achievements
Ask your Agents to add Game Center to your game, set up its leaderboards and achievements in App Store Connect, and try them in a TestFlight build before the update goes out.
Game Center gives your game leaderboards, where players compare scores, and achievements they earn as they play. Two things are needed: Game Center switched on for your app, and the leaderboards and achievements created in App Store Connect. Your Agents do both, with the code that reports scores.
AirBuild has no Game Center screen. You check the result in your game on your own iPhone or iPad, and in App Store Connect. If you’re still making the game, start with Make a game.
Before you start
- Your Apple Developer account connected to AirBuild, and an App Store Connect record for the app. See Connect your Apple Developer account.
- Game Center is an Apple capability. An install signed with a free Apple ID leaves it out: the app installs, but Game Center doesn’t work in it. See Install with a free Apple ID (Mac).
Ask for them
Say in the Project’s chat what players should compete on and earn, for example:
Add Game Center. One leaderboard for the best score, highest first, and achievements for the first win and for reaching level 10.Your Agents turn on Game Center for the app (see Turn on iCloud, App Groups or another capability), create the leaderboards and achievements in App Store Connect with asc game-center, with the names players see in each language, and add the code that reports scores and achievements.
They tell you in the chat what they created. To see the list at any time, ask “Which leaderboards and achievements does the game have?”. The Agent reads it with asc game-center leaderboards list and asc game-center achievements list.
What to decide
These are the choices asc game-center takes. Say them in your request if you have a preference.
| For | Choice |
|---|---|
| Leaderboard | A reference name for you, and an ID the code uses. |
| Leaderboard | How scores look: a whole number, a number with decimals, a time, or an amount of money. |
| Leaderboard | Whether the highest or the lowest score ranks first. |
| Leaderboard | Whether a player’s best score counts, or their most recent one. |
| Achievement | A reference name, an ID, and how many points it’s worth. |
| Achievement | Whether it shows before it’s earned, and whether it can be earned again. |
Try them before release
A TestFlight build, played while you’re signed in to Game Center on the device, is where you can try them before the update goes out.
- Have your Agents upload a build. See Share a beta with TestFlight.
- Install it from TestFlight on your iPhone or iPad. See Share a beta with TestFlight.
- Play while signed in to Game Center. Post a score and earn an achievement.
- Open the game’s leaderboard and achievements and look for your score and achievement.
If a score doesn’t appear, tell the Agent what you did and what you saw.
Ship them
New leaderboards and achievements reach players with a version of your app. Ask the Agent to add Game Center to the version you submit (it uses asc game-center app-versions), then submit the version as usual. See Ship an update to your app.