Enumeration

CKError.Code

Error codes that are returned by CloudKit.

Declaration

enum CKError.Code : Int, _ErrorCodeProtocol

Overview

Nearly all CloudKit operations can take an array of items. Each of those items can fail in a different way, but CKOperation exposes only a single NSError when it fails.

To find out what happened to each individual item, your app needs to look at the CKPartialErrorsByItemIDKey key in the top-level error's userInfo dictionary. Under this key, you will find a dictionary with an entry for each item that encountered an error. Make sure to handle each error individually, because there could be multiple different failures in a single operation.

Topics

Error Codes

case alreadyShared

An error indicating that a record or share cannot be saved because doing so would cause the same hierarchy of records to exist in multiple shares.

case assetFileModified

An error indicating that the content of the specified asset file was modified while being saved.

case assetFileNotFound

An error that is returned when the specified asset file is not found.

case badContainer

An error that is returned when the specified container is unknown or unauthorized.

case badDatabase

An error indicating that the operation could not be completed on the given database.

case batchRequestFailed

An error indicating that the entire batch was rejected.

case changeTokenExpired

An error indicating that the previous server change token is too old.

case constraintViolation

An error indicating that the server rejected the request because of a conflict with a unique field.

case incompatibleVersion

An error indicating that your app version is older than the oldest version allowed.

case internalError

A nonrecoverable error encountered by CloudKit.

case invalidArguments

An error that is returned when the specified request contains bad information.

case limitExceeded

An error that is returned when a request to the server is too large.

case managedAccountRestricted

An error that is returned when a request is rejected due to a managed-account restriction.

case missingEntitlement

An error that is returned when the app is missing a required entitlement.

case networkFailure

An error that is returned when the network is available but cannot be accessed.

case networkUnavailable

An error that is returned when the network is not available.

case notAuthenticated

An error indicating that the current user is not authenticated, and no user record was available.

case operationCancelled

An error indicating that an operation was explicitly canceled.

case partialFailure

An error indicating that some items failed, but the operation succeeded overall.

case participantMayNeedVerification

An error that is returned when the user is not a member of the share.

case permissionFailure

An error indicating that the user did not have permission to perform the specified save or fetch operation.

case quotaExceeded

An error that is returned when saving the record would exceed the user’s current storage quota.

case referenceViolation

An error that is returned when the target of a record's parent or share reference is not found.

case requestRateLimited

Transfers to and from the server are being rate limited for the client at this time.

case resultsTruncated

An error indicating that the query results were truncated by the server.

Deprecated
case serverRecordChanged

An error indicating that the record was rejected because the version on the server is different.

case serverRejectedRequest

An error indicating that the server rejected the request.

case serviceUnavailable

An error that is returned when the CloudKit service is unavailable.

case tooManyParticipants

An error indicating that a share cannot be saved because too many participants are attached to the share.

case unknownItem

An error that is returned when the specified record does not exist.

case userDeletedZone

An error indicating that the user has deleted this zone from the settings UI.

case zoneBusy

An error indicating that the server is too busy to handle the zone operation.

case zoneNotFound

An error indicating that the specified record zone does not exist on the server.

Enumeration Cases

See Also

Error Codes

static var alreadyShared: CKError.Code

An error indicating that a record or share cannot be saved because doing so would cause the same hierarchy of records to exist in multiple shares.

static var assetFileModified: CKError.Code

An error indicating that the content of the specified asset file was modified while being saved.

static var assetFileNotFound: CKError.Code

An error that is returned when the specified asset file is not found.

static var badContainer: CKError.Code

An error that is returned when the specified container is unknown or unauthorized.

static var badDatabase: CKError.Code

An error indicating that the operation could not be completed on the given database.

static var batchRequestFailed: CKError.Code

An error indicating that the entire batch was rejected.

static var changeTokenExpired: CKError.Code

An error indicating that the previous server change token is too old.

static var constraintViolation: CKError.Code

An error indicating that the server rejected the request because of a conflict with a unique field.

static var incompatibleVersion: CKError.Code

An error indicating that your app version is older than the oldest version allowed.

static var internalError: CKError.Code

A nonrecoverable error encountered by CloudKit.

static var invalidArguments: CKError.Code

An error that is returned when the specified request contains bad information.

static var limitExceeded: CKError.Code

An error that is returned when a request to the server is too large.

static var managedAccountRestricted: CKError.Code

An error that is returned when a request is rejected due to a managed-account restriction.

static var missingEntitlement: CKError.Code

An error that is returned when the app is missing a required entitlement.

static var networkFailure: CKError.Code

An error that is returned when the network is available but cannot be accessed.

static var networkUnavailable: CKError.Code

An error that is returned when the network is not available.

static var notAuthenticated: CKError.Code

An error indicating that the current user is not authenticated, and no user record was available.

static var operationCancelled: CKError.Code

An error indicating that an operation was explicitly canceled.

static var partialFailure: CKError.Code

An error indicating that some items failed, but the operation succeeded overall.

static var participantMayNeedVerification: CKError.Code

An error that is returned when the user is not a member of the share.

static var permissionFailure: CKError.Code

An error indicating that the user did not have permission to perform the specified save or fetch operation.

static var quotaExceeded: CKError.Code

An error that is returned when saving the record would exceed the user’s current storage quota.

static var referenceViolation: CKError.Code

An error that is returned when the target of a record's parent or share reference is not found.

static var requestRateLimited: CKError.Code

Transfers to and from the server are being rate limited for the client at this time.

static var resultsTruncated: CKError.Code

An error indicating that the query results were truncated by the server.

Deprecated
static var serverRecordChanged: CKError.Code

An error indicating that the record was rejected because the version on the server is different.

static var serverRejectedRequest: CKError.Code

An error indicating that the server rejected the request.

static var serviceUnavailable: CKError.Code

An error that is returned when the CloudKit service is unavailable.

static var tooManyParticipants: CKError.Code

An error indicating that a share cannot be saved because too many participants are attached to the share.

static var unknownItem: CKError.Code

An error that is returned when the specified record does not exist.

static var userDeletedZone: CKError.Code

An error indicating that the user has deleted this zone from the settings UI.

static var zoneBusy: CKError.Code

An error indicating that the server is too busy to handle the zone operation.

static var zoneNotFound: CKError.Code

An error indicating that the specified record zone does not exist on the server.