The top-level player object containing basic identifying information for a player.
SDKs
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
Framework
- Game
Kit
Declaration
class GKBasePlayer : NSObject
Overview
GKBase
is the top level implementation for the different player objects. From GKBase
, player objects follow two different paths. GKCloud
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 GKLocal
to ensure the current player has a Game Center account and is logged in.