Create experiences that keep players coming back to your game. Add leaderboards, achievements, matchmaking, challenges, and more.


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

GameKit Features

GameKit provides you with the ability to create apps that allow players to interact with each other. Multiplayer apps allow your game to create realtime network matches. Players can invite other players to join their game. 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 simultaneously.Starting in iOS 10.0, GameKit provides the ability to create multiplayer and turn-based using GKGameSession. Game sessions use a player's iCloud account to invite other players to a game, save game data, and transfer data between players. Game sessions fully support the tracking aspects of Game Center. Game Center offers a centralized game service that connects players to each other. Game Center implements many different features:

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

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

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

Game Center is available on iOS, macOS, and tvOS.

Use the legacy classes to support multiplayer and turn-based gaming in iOS 9.0, macOS 10.11, tvOS 9.0 and earlier. Multiplayer and turn-based apps are not compatible between game sessions and legacy classes. However, after updating an app to use game sessions, players still have access to existing achievements, leaderboards, and challenges after being authenticated as the local player.


Adding Players


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


The object representing the currently signed in iCloud user.


An object that handles invite events from Game Center.


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


The protocol you implement to handle events for Game Center accounts.


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


An object used for saving game data, inviting other players, and creating turn-based and realtime game apps.

Incorporating Achievements, Leaderboards, and Challenges


An object that communicates with Game Center about the local player’s progress towards completing an achievement.


A challenge sent to another player urging them to complete a specific achievement.


An object holding text and images used to describe an achievement for an app.


An object representing a challenge issued by the local player to another player.


An object that responds to challenge events.


An object used to read data from a leaderboard stored on Game Center.


An object that organizes leaderboards into logical and coherent groups.


An object containing information for a score that was earned by the player.


An object representing a challenge based on a score in a leaderboard.

Working with Game Sessions


An object used for saving game data, inviting other players, and creating turn-based and realtime game apps.


An object that handles game session events.


An object that displays a user interface, allowing users to invite others into their tvOS game session.


The protocol you implement to respond to changes to a sharing user interface, represented by a GKGameSessionSharingViewController.

Adding a Game Center View Controller


An object that provides the ability to present Game Center view controller classes in macOS.


A single user interface used to display achievements and leaderboards supported by Game Center.


The delegate is called when the player dismisses the Game Center user interface.


An abstract base class for Game Center view controller classes.


GameKit Error Domains

The error code domains for GameKit.

GameKit Constants

GameKit constants affecting multiple classes.

GameKit Enumerations

GameKit enumerations affecting multiple classes.

GameKit Data Types

GameKit data types affecting multiple classes.

Deprecated APIs


An GKAchievementViewController object provides a standard user interface to display achievement progress for the local player. If the GKGameCenterViewController class is available, you should use it instead.


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


The GKFriendRequestComposeViewControllerDelegate protocol is implemented by delegates of the GKFriendRequestComposeViewController class. The delegate is called when the player dismisses the friend request.


The GKLeaderboardViewController class provides a standard user interface that displays leaderboard scores to the player. If the GKGameCenterViewController class is available, you should use it instead.


The GKPeerPickerControllerDelegate protocol is implemented on an object to customize the behavior of a GKPeerPickerController object. The delegate is called by the peer picker to create a session object and to respond as the session is configured by the controller.


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


An object implements the GKSessionDelegate protocol to control the behavior of a GKSession object. The delegate is called when other visible peers change their state relative to the session. It is also called to determine whether another peer is allowed to connect to the session.


The GKTurnBasedEventHandler class is used to respond to important messages related to turn-based matches. To use it, call the shared() class method to get the Singleton instance and assign an object that implements the GKTurnBasedEventHandlerDelegate protocol to its delegate property. All methods are called on the main thread.


The GKVoiceChatClient protocol is implemented to control the behavior of the GKVoiceChatService object. The voice chat client has a number of responsibilities:


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


See Also

Related Documentation