<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "s:SC11GKErrorCodeLeV"
  },
  "title" : "GKError"
}
-->

# GKError

The error structure used by this framework.

```
struct GKError
```

## Topics

### Error Codes

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

Error codes for the GameKit error domain.

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

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

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

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

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

The challenge request failed due to invalid challenge data.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The app doesn’t have Game Center enabled.

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

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

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

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

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

The player’s status exceeds the maximum length.

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

The player’s status is invalid.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

An unexpected player has connected to a match.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The system denies access to the local player’s friends list because the game didn’t provide a reason.

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

The system restricts access to the local player’s friends list.

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

The local player denies access to their friends list.

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

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

### Error Domain

[`errorDomain`](/documentation/GameKit/GKError/errorDomain)



---

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)