O'Reilly logo

Swift 3 Game Development - Second Edition by Stephen Haney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required