Contents

GKGameCenterViewController

The dashboard that allows players to access their Game Center data in your game.

Declaration

class GKGameCenterViewController

Mentioned in

Overview

This view controller presents the dashboard from which players can browse and manage their Game Center data. You can present the dashboard in a specific state from which players can navigate to other areas, including their profile. Your game should pause other activities before presenting the dashboard.

To present the dashboard, initialize a new GKGameCenterViewController object and set its delegate. Optionally, initialize a view controller in a specific state, to show a leaderboard with scores from a set of players or during a time period, or to show a specific achievement. Then present the view controller to the player, and GameKit calls your delegate when the player dismisses it.

For visionOS games, the dashboard appears anchored to the window, scene, or view relative to where you present the view controller. For immersive games, set the parent window to a separate window group than the immersive space window group. For the visionOS location of the dashboard when using the access point, see Configure the access point on visionOS.

Topics

Configuring Game Center content

Setting the view controller delegate

Deprecated

See Also

Deprecated classes