<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:@E@GKErrorCode"
  },
  "title" : "GKError.Code"
}
-->

# GKError.Code

Error codes for the GameKit error domain.

```
enum Code
```

## Topics

### Configuration Errors

[`GKError.Code.gameUnrecognized`](/documentation/GameKit/GKError/Code/gameUnrecognized)

The system can’t complete the requested operation because Game Center doesn’t recognize the app.

[`GKError.Code.notSupported`](/documentation/GameKit/GKError/Code/notSupported)

The app doesn’t have Game Center enabled.

[`GKError.Code.appUnlisted`](/documentation/GameKit/GKError/Code/appUnlisted)

The system can’t complete the requested operation because the game isn’t available on the App Store.

### Communication Errors

[`GKError.Code.unknown`](/documentation/GameKit/GKError/Code/unknown)

The system can’t complete the requested operation due to an unknown error.

[`GKError.Code.cancelled`](/documentation/GameKit/GKError/Code/cancelled)

The system canceled the requested operation or the user disabled it.

[`GKError.Code.communicationsFailure`](/documentation/GameKit/GKError/Code/communicationsFailure)

The system can’t complete the requested operation due to an error communicating with the server.

[`GKError.Code.invalidPlayer`](/documentation/GameKit/GKError/Code/invalidPlayer)

The system can’t complete the requested operation because the player is invalid.

[`GKError.Code.invalidParameter`](/documentation/GameKit/GKError/Code/invalidParameter)

The system can’t complete the requested operation because one or more parameters are invalid.

[`GKError.Code.gameSessionRequestInvalid`](/documentation/GameKit/GKError/Code/gameSessionRequestInvalid)

The properties of the game session request are impossible to fulfill.

[`GKError.Code.apiNotAvailable`](/documentation/GameKit/GKError/Code/apiNotAvailable)

The system can’t complete the requested operation because the API isn’t available.

[`GKError.Code.connectionTimeout`](/documentation/GameKit/GKError/Code/connectionTimeout)

The system can’t complete the requested operation because the connection timed out.

[`GKError.Code.apiObsolete`](/documentation/GameKit/GKError/Code/apiObsolete)

The system can’t complete the requested operation because Apple deprecated the API.

### Player-Related Errors

[`GKError.Code.userDenied`](/documentation/GameKit/GKError/Code/userDenied)

The system can’t complete the requested operation because the user denied it.

[`GKError.Code.invalidCredentials`](/documentation/GameKit/GKError/Code/invalidCredentials)

The system can’t complete the requested operation because the user name or password are incorrect.

[`GKError.Code.notAuthenticated`](/documentation/GameKit/GKError/Code/notAuthenticated)

The system can’t complete the requested operation because the system hasn’t authorized the player.

[`GKError.Code.authenticationInProgress`](/documentation/GameKit/GKError/Code/authenticationInProgress)

The system can’t complete the requested operation because the local player is already authenticating.

[`GKError.Code.parentalControlsBlocked`](/documentation/GameKit/GKError/Code/parentalControlsBlocked)

The system can’t complete the requested operation because the user disabled this feature in Restrictions.

[`GKError.Code.playerStatusExceedsMaximumLength`](/documentation/GameKit/GKError/Code/playerStatusExceedsMaximumLength)

The player’s status exceeds the maximum length.

[`GKError.Code.playerStatusInvalid`](/documentation/GameKit/GKError/Code/playerStatusInvalid)

The player’s status is invalid.

[`GKError.Code.underage`](/documentation/GameKit/GKError/Code/underage)

The system can’t complete the requested operation because this feature isn’t available to underage players.

[`GKError.Code.playerPhotoFailure`](/documentation/GameKit/GKError/Code/playerPhotoFailure)

The system can’t complete the requested operation to retrieve a player’s photo.

[`GKError.Code.ubiquityContainerUnavailable`](/documentation/GameKit/GKError/Code/ubiquityContainerUnavailable)

The system can’t complete the requested operation because the user hasn’t signed in to iCloud or hasn’t enabled iCloud Drive.

[`GKError.Code.notAuthorized`](/documentation/GameKit/GKError/Code/notAuthorized)

The system can’t complete the requested operation because the system hasn’t authorized the player.

[`GKError.Code.iCloudUnavailable`](/documentation/GameKit/GKError/Code/iCloudUnavailable)

The system can’t complete the requested operation because it can’t access the player’s iCloud account.

[`GKError.Code.lockdownMode`](/documentation/GameKit/GKError/Code/lockdownMode)

The system can’t complete the requested operation because the player enabled Lockdown Mode on the device.

### Friend List Errors

[`GKError.Code.friendListDescriptionMissing`](/documentation/GameKit/GKError/Code/friendListDescriptionMissing)

Access to the local player’s list of friends denied for lack of a reason.

[`GKError.Code.friendListRestricted`](/documentation/GameKit/GKError/Code/friendListRestricted)

Access to the local player’s list of friends restricted.

[`GKError.Code.friendListDenied`](/documentation/GameKit/GKError/Code/friendListDenied)

Access to the local player’s list of friends denied.

[`GKError.Code.friendRequestNotAvailable`](/documentation/GameKit/GKError/Code/friendRequestNotAvailable)

The player can’t send a friend request at this time from this device.

### Matchmaking Errors

[`GKError.Code.matchRequestInvalid`](/documentation/GameKit/GKError/Code/matchRequestInvalid)

The system can’t complete the requested operation because the match request is invalid.

[`GKError.Code.unexpectedConnection`](/documentation/GameKit/GKError/Code/unexpectedConnection)

An unexpected player has connected to a match.

[`GKError.Code.invitationsDisabled`](/documentation/GameKit/GKError/Code/invitationsDisabled)

The system can’t complete the requested operation because the receiving player has disabled invitations.

[`GKError.Code.matchNotConnected`](/documentation/GameKit/GKError/Code/matchNotConnected)

The system can’t complete the requested operation because the match isn’t connected to other players.

[`GKError.Code.restrictedToAutomatch`](/documentation/GameKit/GKError/Code/restrictedToAutomatch)

The system can’t complete the requested operation because the player is using automatch.

### Turn-Based Game Errors

[`GKError.Code.turnBasedMatchDataTooLarge`](/documentation/GameKit/GKError/Code/turnBasedMatchDataTooLarge)

The system can’t complete the requested operation because the match data is too large.

[`GKError.Code.turnBasedTooManySessions`](/documentation/GameKit/GKError/Code/turnBasedTooManySessions)

The system can’t complete the requested operation because it exceeds the maximum number of sessions.

[`GKError.Code.turnBasedInvalidParticipant`](/documentation/GameKit/GKError/Code/turnBasedInvalidParticipant)

The system can’t complete the requested operation because the specified participant is invalid.

[`GKError.Code.turnBasedInvalidTurn`](/documentation/GameKit/GKError/Code/turnBasedInvalidTurn)

The system can’t complete the requested operation because the participant doesn’t have the required turn state.

[`GKError.Code.turnBasedInvalidState`](/documentation/GameKit/GKError/Code/turnBasedInvalidState)

The system can’t complete the requested operation because the session is in an invalid state.

### Leaderboard Errors

[`GKError.Code.scoreNotSet`](/documentation/GameKit/GKError/Code/scoreNotSet)

The system can’t complete the requested operation because the system hasn’t set the score.

### Challenges Errors

[`GKError.Code.challengeInvalid`](/documentation/GameKit/GKError/Code/challengeInvalid)

The challenge request failed due to invalid challenge data.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)