November 2011
Beginner
238 pages
6h 19m
English
Before any Game Center–specific code can be called, we need to perform a test to verify that the user has a version of iOS that supports Game Center. The first thing we need to do to perform this check is to create our new GameCenterManager class. We will use this class throughout the remainder of this book to keep our Game Center functionality in one easy-to-access class. This class will house all of our Game Center–specific code and callbacks, and can be easily shared across all of your apps.
First, create a new file in Xcode. You will want to select the Objective-C Subclass from the available templates. Make sure that you also select NSObject under the “Subclass of” pull-down menu. Name the new class GameCenterManager, ...