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

Working with GKLocalPlayer

The GKLocalPlayer will always exist and be non-nil when authenticated with Game Center; this object is a representation of the user. You will never create an instance of GKLocalPlayer; this is handled through the class method localPlayer. The localPlayer singleton will be the only way that you will interact with the localPlayer.

The GKLocalPlayer has three properties associated with it: authenticated, friends, and underage. We will be dealing with the friends property in the following section. We have already worked with the authenticated Boolean in our authentication code in the previous sections.

The underage property is useful for restricting content in a Game Center–enabled app to users over the age of 17. The following ...

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