iOS Developer Library — Prerelease


GameKit Framework Reference


Classes   Protocols   Other Reference  

Game Kit offers features that you can use to create great social games.

Game Kit Features

Game Kit provides three separate pieces of functionality:

  • Game Center offers a centralized game service that connects players to each other. Game Center implements many different features:

    • Friends allow players to create anonymous online personas. Users connect to Game Center and interact with other players through an alias. Players can set status messages as well as mark other players as friends.

    • Multiplayer allows your game to create network matches that connect players through Game Center. Players can invite their friends or be connected to anonymous players. Most importantly, players can receive invitations to join a match even when your game is not running. Your game is running on each device and the instances of your game exchange match and voice data with each other.

    • Turn-Based Gaming provides store-and-forward network match infrastructure where the match is played out over a series of discrete turns. This kind of match can be played without requiring all of the players to be connected to Game Center simultaneously.

    • Leaderboards allow your game to store and fetch player scores from Game Center.

    • Achievements provide the ability to track a player’s accomplishments in your game.

    • Challenges allow a player to challenge other players to complete an achievement or to beat a leaderboard score.

    Game Center is available on iOS and OS X.

  • Peer-to-peer connectivity allows your game to create an ad hoc Bluetooth or wireless network between multiple iPhones in the same local area. Although designed with games in mind, this network is useful for any type of data exchange among users of your app. For example, an app could use peer-to-peer connectivity to share electronic business cards or other data. This functionality is only available on iOS. You can also get the same functionality using Game Center.

  • In-game voice chat allows your game to provide voice communication between two iPhones. In-game voice relies on your game’s network connection to another user to create its own network connection to transmit voice data. This functionality is only available on iOS. You can also get the same functionality using Game Center.



NSObject is the root class of most Objective-C class hierarchies.


Your game uses a GKAchievement object to communicate with Game Center about the local player’s progress towards completing an achievement.


An GKAchievementDescription object holds text and images used to describe an achievement.


A GKChallenge object represents a challenge issued by a player to another player.


A GKAchievementChallenge is a challenge to a player to complete a specific achievement.


A GKScoreChallenge object represents a challenge based on a score in a leaderboard.


The GKChallengeEventHandler class is used to respond to events related to challenges sent or received by the local player.


A GKInvite object represents a matchmaking invitation sent by another player to the local player.


A GKLeaderboard object is used to read data from a leaderboard stored on Game Center.


Add leaderboard sets to your app and organize your leaderboards into logical and coherent groups.


A GKMatch object provides a peer-to-peer network between a group of devices that are connected to Game Center.


A GKMatchRequest object is used to specify the parameters for a new live or turn-based match.


The GKMatchmaker class is used to programmatically create matches to other players and to receive match invitations sent by other players.


The GKNotificationBanner class allows your game to display a notification banner that displays text to the player.


The GKPeerPickerController class provides a standard user interface to allow one iOS device to discover and connect to another.


GKPlayer objects provide information about a player on Game Center.


The GKLocalPlayer class is a special subclass of GKPlayer that represents the authenticated player running your game on the device.


A GKSavedGame object contains the metadata for identifying a saved game and a method for loading a previously saved game.


A GKScore class holds information for a score that was earned by the player.


A GKSession object provides the ability to discover and connect to nearby iOS devices using Bluetooth or Wi-fi.


The GKTurnBasedEventHandler class is used to respond to important messages related to turn-based matches.


A GKTurnBasedExchange object provides developers with a way to expand how turn based matches are currently played by allowing players to send information even when they are not the current player.


Describes a GKTurnBasedExchangeReply object that contains a player’s response to an exchange.


The GKTurnBasedMatch class allows your game to implement turn-based matches between sets of players on Game Center.


A GKTurnBasedParticipant object stores information for a participant in a turn-based match.


A GKVoiceChat object provides a voice channel that allows a set of players in a match to speak with each other.


The GKVoiceChatService class allows your application to connect two iOS devices into a voice chat.


The UINavigationController class implements a specialized view controller that manages the navigation of hierarchical content.


Your game uses the GKFriendRequestComposeViewController class to present a screen that allows the local player to send friend requests to other players.


The GKGameCenterViewController class aggregates many common Game Center features into a single user interface.


An GKAchievementViewController object provides a standard user interface to display achievement progress for the local player.


The GKLeaderboardViewController class provides a standard user interface that displays leaderboard scores to the player.


The GKMatchmakerViewController class is used to present a standard user interface to the player.


The GKTurnBasedMatchmakerViewController class displays a user interface that allows players to manage the turn-based matches that they are participating in.



An object implementing the GKAchievementViewControllerDelegate protocol is called when the user dismisses the achievements view controller.


You implement the GKChallengeEventHandlerDelegate delegate to control how challenges are displayed in your game.


Provides methods for responding to challenge events.


The GKFriendRequestComposeViewControllerDelegate protocol is implemented by delegates of the GKFriendRequestComposeViewController class.


The GKGameCenterControllerDelegate protocol is implemented by delegates of the GKGameCenterViewController class.


Handles invite invite events form Game Center.


The GKLeaderboardViewControllerDelegate protocol is implemented by delegates of the GKLeaderboardViewController class.


The GKLocalPlayerListener protocol inherits the methods from GKChallengeListener, GKInviteEventListener, and GKTurnBasedEventListener in order to handle multiple events.


The GKMatchDelegate protocol is implemented to receive status updates and network data from players connected to a GKMatch object.


A class implements the GKMatchmakerViewControllerDelegate protocol to receive notifications from a GKMatchmakerViewController object.


The GKPeerPickerControllerDelegate protocol is implemented on an object to customize the behavior of a GKPeerPickerController object.


Override the methods in the GKSavedGameListener protocol to provide custom actions when a saved game file is modified or a conflict is found.


An object implements the GKSessionDelegate protocol to control the behavior of a GKSession object.


The GKTurnBasedEventHandlerDelegate protocol is implemented by an object to receive notifications events for turn-based matches.


Handles events for turn-based games.


Your game implements the GKTurnBasedMatchmakerViewControllerDelegate protocol on an object to respond to events generated by a GKTurnBasedMatchmakerViewController object.


The GKVoiceChatClient protocol is implemented to control the behavior of the GKVoiceChatService object.

Other Reference

GameKit Constants Reference