Skip to Content
Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch
book

Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch

by Kyle Richter
November 2011
Beginner content levelBeginner
238 pages
6h 19m
English
Apress
Content preview from Beginning iOS Game Center and Game Kit: For iPhone, iPad, and iPod touch

Testing for Game Center

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ARKit for iPhone and iPad: Augmented Reality App Development for iOS

Beginning ARKit for iPhone and iPad: Augmented Reality App Development for iOS

Wallace Wang
iOS 4 in Action

iOS 4 in Action

Lin Harrington, Shannon Appelcline, Christopher R. Allen, Brandon Trebitowski
iOS 7 Development Recipes: A Problem-Solution Approach

iOS 7 Development Recipes: A Problem-Solution Approach

Joseph Hoffman, Hans-Eric Grönlund, Colin Francis, Shawn Grimes

Publisher Resources

ISBN: 9781430235279Purchase book