Add Game Center Capability Using Xcode

Apple Game Frameworks and Technologies — by Tammy Coron (151 / 193)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Chapter 16 Adding Leaderboards and Achievements | TOC | Use App Store Connect to Add a New App 👉

To enable Game Center in Hog Dice, you need to add the Game Center capability to the Xcode project and target.

Open the hog project in Xcode.

Using the Starter Project

The starter project is located in the projects/begin folder included with the code resources for this chapter.

There’s also an ending project for this chapter that includes all of the code and resources you’ll be adding here. The end project is located in the projects/end folder included with the code resources for this chapter.

In the Project Navigator, select the hog project file, and in the Project Editor, select the hog target. Now, switch to the Signing & Capabilities tab and you’ll see something like the image shown.

images/AddingLeaderboardsAndAchievements/pre-add-capability.png

As you learned in Chapter 1, Creating Scenes with Sprites and Nodes, the Bundle Identifier must be unique when publishing a project to the App Store. Because the Bundle ID, net.justwritecode.hogdice, already exists on my Apple developer account, be sure to change the Bundle ID to something…

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.