Adding a leaderboard of high scores

We will submit the player's scores to the Game Center servers every time they finish a game. The first step is to register a new leaderboard on iTunes Connect.

Creating a new leaderboard in iTunes Connect

First, we will create our leaderboard in iTunes Connect. We can then connect to this leaderboard from our code and send new scores. Follow these steps to create the leaderboard record in iTunes Connect:

  1. Log back in to iTunes Connect and navigate into the Game Center page for your app.
  2. Locate and click the button that says Add Leaderboard.
  3. The next page asks you what type of leaderboard you want to create. Choose Single Leaderboard.
  4. Fill out the information for your leaderboard. You can reference my example here: ...

Get Game Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.