November 2011
Beginner
238 pages
6h 19m
English
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 ...