The top-level player object containing basic identifying information for a player.


class GKBasePlayer : NSObject


GKBasePlayer is the top level implementation for the different player objects. From GKBasePlayer, player objects follow two different paths. GKCloudPlayer objects use the player's iCloud account to join games, invite other players, save data, and send information between players. GKPlayer objects are used by the GameKit legacy classes to identify a Game Center account. In either case, accessing achievements, leaderboards, and challenges requires authentication of the local player. Use GKLocalPlayer to ensure the current player has a Game Center account and is logged in.


Identifying a Player

var displayName: String?

The Game Center profile name associated with a player.

var playerID: String?

A unique identifier associated with a player.


Inherits From

Conforms To

See Also


class GKLocalPlayer

An object representing the authenticated Game Center player on a device.

class GKPlayer

An object that provides information about a player on Game Center.

protocol GKLocalPlayerListener

A protocol that handles events for Game Center accounts.

protocol GKInviteEventListener

A protocol that handles invite events from Game Center.