Creating the Leaderboard
1. Head to App Store Connect and open your app.
2. Select the services tab across the top of the page and click the + button in the leaderboard section to create a new leaderboard
3. You get the choice of a classic leaderboard or a recurring leaderboard. For the images here we went with classic.
4. Fill in the required information on this page and add a language in the localization section.
5. Click save to create the leaderboard. (Make note of your leaderboard ID, as you will reference that with behaviors in GameSalad)
6. Use the service/platform behaviors in GameSalad to utilize your leaderboard.
The key behaviors and their uses are listed below.
Login: This behavior logs the user in to game center automatically, or prompts them to login if they aren’t already. Run this behavior outside of a rule on the first scene of your game.
Post Score: This behavior sends the value of an attribute to the leaderboard ID that you have filled in. Run this behavior when you want to add a new score to the leaderboard (i.e after a player gets a high score).
Show Leaderboard: This behavior pops up the game center interface to show your leaderboard. Run this behavior inside an actor that serves as a button so the player can check the leaderboard when they want to.
Once you’ve configured your leaderboard and have set up the behaviors in your GameSalad project you should be all set!