One Logo Pool Ball
App Services · IOS API REFERENCE

CloudKit

Store structured app and user data in iCloud containers that all users of your app can share.

157 types

860 callable entries

46 skipped

95% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

CKAcceptSharesOperation

class · iOS 10.0+

CKAccountStatus

enum · iOS 8.0+

CKAllowedSharingOptions

class · iOS 16.0+

CKAsset

class · iOS 8.0+

CKAsset.ExportedAssetID

struct · iOS 27.0+

CKContainer

class · iOS 8.0+

CKContainer_Application_PermissionBlock

typealias · iOS 8.0+ · Deprecated

CKContainer_Application_Permissions

typealias · iOS 8.0+ · Deprecated

CKContainer_Application_PermissionStatus

typealias · iOS 8.0+ · Deprecated

CKContainer.Application

enum · iOS 8.0+

CKContainer.Application.PermissionBlock

typealias · iOS 8.0+ · Deprecated

CKContainer.Application.Permissions

typealias · iOS 8.0+ · Deprecated

CKContainer.Application.PermissionStatus

typealias · iOS 8.0+ · Deprecated

CKContainer.ApplicationPermissionBlock

typealias · iOS 8.0+ · Deprecated in iOS 17.0

CKContainer.ApplicationPermissions

struct · iOS 8.0+

CKContainer.ApplicationPermissionStatus

enum · iOS 8.0+ · Deprecated in iOS 17.0

CKDatabase

class · iOS 8.0+

CKDatabase.DatabaseChange

enum · iOS 15.0+

CKDatabase.DatabaseChange.Deletion

struct · iOS 15.0+

CKDatabase.DatabaseChange.Deletion.Reason

enum · iOS 17.0+

CKDatabase.DatabaseChange.Modification

struct · iOS 15.0+

CKDatabase.RecordZoneChange

enum · iOS 15.0+

CKDatabase.RecordZoneChange.Deletion

struct · iOS 15.0+

CKDatabase.RecordZoneChange.Modification

struct · iOS 15.0+

CKDatabase.Scope

enum · iOS 10.0+

CKDatabaseNotification

class · iOS 10.0+

CKDatabaseOperation

class · iOS 8.0+

CKDatabaseSubscription

class · iOS 10.0+

CKDiscoverAllUserIdentitiesOperation

class · iOS 10.0+ · Deprecated in iOS 17.0

CKDiscoverUserIdentitiesOperation

class · iOS 10.0+ · Deprecated in iOS 17.0

CKError

struct · iOS 8.0+

CKError.Code

enum · iOS 8.0+

CKFetchDatabaseChangesOperation

class · iOS 10.0+

CKFetchRecordChangesOperation

class · iOS 8.0+ · Deprecated in iOS 10.0

CKFetchRecordsOperation

class · iOS 8.0+

CKFetchRecordZoneChangesOperation

class · iOS 10.0+

CKFetchRecordZoneChangesOperation.ZoneConfiguration

class · iOS 12.0+

CKFetchRecordZoneChangesOperation.ZoneOptions

class · iOS 10.0+ · Deprecated in iOS 12.0

CKFetchRecordZonesOperation

class · iOS 8.0+

CKFetchShareMetadataOperation

class · iOS 10.0+

CKFetchShareParticipantsOperation

class · iOS 10.0+

CKFetchSubscriptionsOperation

class · iOS 8.0+

CKFetchWebAuthTokenOperation

class · iOS 9.2+

CKLocationSortDescriptor

class · iOS 8.0+

CKModifyRecordsOperation

class · iOS 8.0+

CKModifyRecordsOperation.RecordSavePolicy

enum · iOS 8.0+

CKModifyRecordZonesOperation

class · iOS 8.0+

CKModifySubscriptionsOperation

class · iOS 8.0+

CKNotification

class · iOS 8.0+

CKNotification.ID

class · iOS 8.0+

CKNotification.NotificationType

enum · iOS 8.0+

CKOperation

class · iOS 8.0+

CKOperation.Configuration

class · iOS 11.0+

CKOperation.ID

typealias · iOS 8.0+

CKOperationGroup

class · iOS 11.0+

CKOperationGroup.TransferSize

enum · iOS 11.0+

CKQuery

class · iOS 8.0+

CKQueryNotification

class · iOS 8.0+

CKQueryNotification.Reason

enum · iOS 8.0+

CKQueryOperation

class · iOS 8.0+

CKQueryOperation.Cursor

class · iOS 8.0+

CKQuerySubscription

class · iOS 10.0+

CKQuerySubscription.Options

struct · iOS 10.0+

CKRecord

class · iOS 8.0+

CKRecord_Reference_Action

typealias · iOS 8.0+ · Deprecated

CKRecord.Element

typealias · iOS 8.0+

CKRecord.FieldKey

typealias · iOS 8.0+

CKRecord.ID

class · iOS 8.0+

CKRecord.Iterator

typealias · iOS 8.0+

CKRecord.RecordType

typealias · iOS 8.0+

CKRecord.Reference

class · iOS 8.0+

CKRecord.Reference.Action

typealias · iOS 8.0+ · Deprecated

CKRecord.ReferenceAction

enum · iOS 8.0+

CKRecord.SystemFieldKey

enum · iOS 8.0+

CKRecord.SystemType

enum · iOS 8.0+

CKRecordKeyValueIterator

struct · iOS 8.0+

CKRecordKeyValueIterator.Element

typealias · iOS 8.0+

CKRecordKeyValueSetting

protocol · iOS 9.0+

CKRecordValue

typealias · iOS 8.0+

CKRecordValueProtocol

protocol · iOS 8.0+

CKRecordZone

class · iOS 8.0+

CKRecordZone.Capabilities

struct · iOS 8.0+

CKRecordZone.EncryptionScope

enum · iOS 26.0+

CKRecordZone.ID

class · iOS 8.0+

CKRecordZoneNotification

class · iOS 8.0+

CKRecordZoneSubscription

class · iOS 10.0+

CKServerChangeToken

class · iOS 8.0+

CKShare

class · iOS 10.0+

CKShare_Participant_AcceptanceStatus

typealias · iOS 10.0+ · Deprecated

CKShare_Participant_ParticipantType

typealias · iOS 10.0+ · Unavailable in iOS 26.0 · Deprecated

CKShare_Participant_Permission

typealias · iOS 10.0+ · Deprecated

CKShare_Participant_Role

typealias · iOS 12.0+ · Deprecated

CKShare.AccessRequester

class · iOS 26.0+

CKShare.BlockedIdentity

class · iOS 26.0+

CKShare.Metadata

class · iOS 10.0+

CKShare.Participant

class · iOS 10.0+

CKShare.Participant.AcceptanceStatus

typealias · iOS 10.0+ · Deprecated

CKShare.Participant.ID

typealias · iOS 10.0+

CKShare.Participant.ParticipantType

typealias · iOS 10.0+ · Unavailable in iOS 26.0 · Deprecated

CKShare.Participant.Permission

typealias · iOS 10.0+ · Deprecated

CKShare.Participant.Role

typealias · iOS 12.0+ · Deprecated

CKShare.ParticipantAcceptanceStatus

enum · iOS 10.0+

CKShare.ParticipantPermission

enum · iOS 10.0+

CKShare.ParticipantRole

enum · iOS 12.0+

CKShare.ParticipantType

enum · iOS 10.0+ · Deprecated in iOS 12.0 · Unavailable in iOS 26.0

CKShare.SystemFieldKey

enum · iOS 10.0+

CKShareRequestAccessOperation

class · iOS 26.0+

CKShareTransferRepresentation

struct · iOS 16.0+

CKShareTransferRepresentation.Body

typealias · iOS 16.0+

CKShareTransferRepresentation.ExportedShare

struct · iOS 16.0+

CKShareTransferRepresentation.ExportedShare.Representation

typealias · iOS 16.0+

CKSharingParticipantAccessOption

struct · iOS 16.0+

CKSharingParticipantPermissionOption

struct · iOS 16.0+

CKSubscription

class · iOS 8.0+

CKSubscription.ID

typealias · iOS 8.0+

CKSubscription.NotificationInfo

class · iOS 8.0+

CKSubscription.SubscriptionType

enum · iOS 8.0+

CKSyncEngine

class · iOS 17.0+

CKSyncEngine.Configuration

struct · iOS 17.0+

CKSyncEngine.Event

enum · iOS 17.0+

CKSyncEngine.Event.AccountChange

struct · iOS 17.0+

CKSyncEngine.Event.AccountChange.ChangeType

enum · iOS 17.0+

CKSyncEngine.Event.DidFetchChanges

struct · iOS 17.0+

CKSyncEngine.Event.DidFetchRecordZoneChanges

struct · iOS 17.0+

CKSyncEngine.Event.DidSendChanges

struct · iOS 17.0+

CKSyncEngine.Event.FetchedDatabaseChanges

struct · iOS 17.0+

CKSyncEngine.Event.FetchedRecordZoneChanges

struct · iOS 17.0+

CKSyncEngine.Event.SentDatabaseChanges

struct · iOS 17.0+

CKSyncEngine.Event.SentDatabaseChanges.FailedZoneSave

struct · iOS 17.0+

CKSyncEngine.Event.SentRecordZoneChanges

struct · iOS 17.0+

CKSyncEngine.Event.SentRecordZoneChanges.FailedRecordSave

struct · iOS 17.0+

CKSyncEngine.Event.StateUpdate

struct · iOS 17.0+

CKSyncEngine.Event.WillFetchChanges

struct · iOS 17.0+

CKSyncEngine.Event.WillFetchRecordZoneChanges

struct · iOS 17.0+

CKSyncEngine.Event.WillSendChanges

struct · iOS 17.0+

CKSyncEngine.FetchChangesContext

struct · iOS 17.0+

CKSyncEngine.FetchChangesOptions

struct · iOS 17.0+

CKSyncEngine.FetchChangesOptions.Scope

enum · iOS 17.0+

CKSyncEngine.PendingDatabaseChange

enum · iOS 17.0+

CKSyncEngine.PendingRecordZoneChange

enum · iOS 17.0+

CKSyncEngine.RecordZoneChangeBatch

struct · iOS 17.0+

CKSyncEngine.SendChangesContext

struct · iOS 17.0+

CKSyncEngine.SendChangesOptions

struct · iOS 17.0+

CKSyncEngine.SendChangesOptions.Scope

enum · iOS 17.0+

CKSyncEngine.State

class · iOS 17.0+

CKSyncEngine.State.Serialization

struct · iOS 17.0+

CKSyncEngine.SyncReason

enum · iOS 17.0+

CKSyncEngineAccountChangeType

enum · iOS 17.0+

CKSyncEngineDelegate

protocol · iOS 17.0+

CKSyncEngineEventType

enum · iOS 17.0+

CKSyncEnginePendingDatabaseChangeType

enum · iOS 17.0+

CKSyncEnginePendingRecordZoneChangeType

enum · iOS 17.0+

CKSyncEngineSyncReason

enum · iOS 17.0+

CKSyncEngineZoneDeletionReason

enum · iOS 17.0+

CKSystemSharingUIObserver

class · iOS 16.0+

CKUserIdentity

class · iOS 10.0+

CKUserIdentity.LookupInfo

class · iOS 10.0+

Functions and constants

get · iOS 9.0+

CKAccountChanged

TypeScript
get CKAccountChanged(): _Foundation_NSNotification_Name
Swift declaration
static let CKAccountChanged: NSNotification.Name
get · iOS 10.0+

CKCurrentUserDefaultName

TypeScript
const CKCurrentUserDefaultName: string
Swift declaration
let CKCurrentUserDefaultName: String
get · iOS 8.0+

CKErrorDomain

TypeScript
const CKErrorDomain: string
Swift declaration
let CKErrorDomain: String
get · iOS 8.0+

CKErrorRetryAfterKey

TypeScript
const CKErrorRetryAfterKey: string
Swift declaration
let CKErrorRetryAfterKey: String
get · iOS 15.0+

CKErrorUserDidResetEncryptedDataKey

TypeScript
const CKErrorUserDidResetEncryptedDataKey: string
Swift declaration
let CKErrorUserDidResetEncryptedDataKey: String
get · iOS 8.0+ · Deprecated in iOS 10.0

CKOwnerDefaultName

TypeScript
const CKOwnerDefaultName: string
Swift declaration
let CKOwnerDefaultName: String
get · iOS 8.0+

CKPartialErrorsByItemIDKey

TypeScript
const CKPartialErrorsByItemIDKey: string
Swift declaration
let CKPartialErrorsByItemIDKey: String
get · iOS 8.0+

CKRecordChangedErrorAncestorRecordKey

TypeScript
const CKRecordChangedErrorAncestorRecordKey: string
Swift declaration
let CKRecordChangedErrorAncestorRecordKey: String
get · iOS 8.0+

CKRecordChangedErrorClientRecordKey

TypeScript
const CKRecordChangedErrorClientRecordKey: string
Swift declaration
let CKRecordChangedErrorClientRecordKey: String
get · iOS 8.0+

CKRecordChangedErrorServerRecordKey

TypeScript
const CKRecordChangedErrorServerRecordKey: string
Swift declaration
let CKRecordChangedErrorServerRecordKey: String
get · iOS 15.0+

CKRecordNameZoneWideShare

TypeScript
const CKRecordNameZoneWideShare: string
Swift declaration
let CKRecordNameZoneWideShare: String
static · iOS 16.0+

prepareShare

TypeScript
static prepareShare(container: CKContainer, allowedSharingOptions: CKAllowedSharingOptions, preparationHandler: (() => Promise<CKShare>)): CKShareTransferRepresentation_ExportedShare<string>
Swift declaration
static func prepareShare(container: CKContainer, allowedSharingOptions: CKAllowedSharingOptions = CKAllowedSharingOptions.standard, preparationHandler: @escaping @Sendable () async throws -> CKShare) -> CKShareTransferRepresentation<Item>.ExportedShare

Creates a share when the system calls the specified handler. - Parameters: - container: The ``CKContainer`` for the share. - allowedSharingOptions: The ``CKAllowedSharingOptions``. The ``CKAllowedSharingOptions/standard`` option is the default. - preparationHandler: The handler the system calls in your app to create a new ``CKShare``. - Returns: The ``CKShareTransferRepresentation/ExportedShare`` with the new ``CKShare``. Use this method when you want to share a collection of ``CKRecord`` objects, but don't currently have a ``CKShare``. When the system calls the `preparationHandler`, create a new ``CKShare`` with the appropriate root ``CKRecord`` or ``CKRecordZone/ID``. After saving the share and all records to the server, return the resulting ``CKShare`` or throw an error if saving fails. When your app invokes the share sheet with a ``CKShare`` registered with this method, the system prompts the user to start sharing.

static · iOS 16.0+

existing

TypeScript
static existing(share: CKShare, container: CKContainer, allowedSharingOptions?: CKAllowedSharingOptions): CKShareTransferRepresentation_ExportedShare<string>
Swift declaration
static func existing(_ share: CKShare, container: CKContainer, allowedSharingOptions: CKAllowedSharingOptions = CKAllowedSharingOptions.standard) -> CKShareTransferRepresentation<Item>.ExportedShare

Allows the user to view or make modifications to the share settings. - Parameters: - share: The existing ``CKShare`` object. - container: The ``CKContainer`` for the share. - allowedSharingOptions: The ``CKAllowedSharingOptions``. The ``CKAllowedSharingOptions/standard`` option is the default. - Returns: The ``CKShareTransferRepresentation/ExportedShare`` with updated share settings. Use this method when you have a ``CKShare`` that's already saved to the server. When your app invokes the share sheet with a ``CKShare`` registered with this method, the system allows the owner to make modifications to the share settings, or allows a participant to view the share settings.

method · iOS 16.0+

registerCKShare

TypeScript
registerCKShareContainerAllowedSharingOptionsPreparationHandler(container: CKContainer, allowedSharingOptions: CKAllowedSharingOptions, preparationHandler: (() => Promise<CKShare>)): void
Swift declaration
func registerCKShare(container: CKContainer, allowedSharingOptions: CKAllowedSharingOptions = CKAllowedSharingOptions.standard, preparationHandler: @escaping @Sendable () async throws -> CKShare)

Use this method when you want to share a collection of CKRecords but don't currently have a CKShare. When the `preparationHandler` is called, you should create a new ``CKShare`` with the appropriate root ``CKRecord`` or ``CKRecordZoneID``. After ensuring the share and all records have been saved to the server, return the resulting ``CKShare`` or throw an error if saving failed. When you invoke the share sheet with a ``CKShare`` registered with this method, the system prompts the user to start sharing.

method · iOS 16.0+

registerCKShare

TypeScript
registerCKShareContainerAllowedSharingOptions(share: CKShare, container: CKContainer, allowedSharingOptions?: CKAllowedSharingOptions): void
Swift declaration
func registerCKShare(_ share: CKShare, container: CKContainer, allowedSharingOptions: CKAllowedSharingOptions = CKAllowedSharingOptions.standard)

Use this method when you have a CKShare that is already saved to the server. When you invoke the share sheet with a ``CKShare`` registered with this method, the system allows the owner to make modifications to the share settings, or allows a participant to view the share settings.

Skipped declarations

46 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

CKRecordTypeUserRecord

The iOS SDK compiler rejected this binding: 'CKRecordTypeUserRecord' has been renamed to 'CKRecord.SystemType.userRecord'

CKRecordParentKey

The iOS SDK compiler rejected this binding: 'CKRecordParentKey' has been renamed to 'CKRecord.SystemFieldKey.parent'

CKRecordShareKey

The iOS SDK compiler rejected this binding: 'CKRecordShareKey' has been renamed to 'CKRecord.SystemFieldKey.share'

CKRecordZoneDefaultName

The iOS SDK compiler rejected this binding: 'CKRecordZoneDefaultName' has been renamed to 'CKRecordZone.ID.defaultZoneName'

CKRecordTypeShare

The iOS SDK compiler rejected this binding: 'CKRecordTypeShare' has been renamed to 'CKRecord.SystemType.share'

CKShareTitleKey

The iOS SDK compiler rejected this binding: 'CKShareTitleKey' has been renamed to 'CKShare.SystemFieldKey.title'

CKShareThumbnailImageDataKey

The iOS SDK compiler rejected this binding: 'CKShareThumbnailImageDataKey' has been renamed to 'CKShare.SystemFieldKey.thumbnailImageData'

CKShareTypeKey

The iOS SDK compiler rejected this binding: 'CKShareTypeKey' has been renamed to 'CKShare.SystemFieldKey.shareType'

CKShareTransferRepresentation.init(exporter:)

synchronous callback requires a nonescaping JS-thread call

CKShareTransferRepresentation.body

This protocol needs associated types that cannot yet cross the bridge.

CKShareTransferRepresentation.ExportedShare.transferRepresentation

This protocol needs associated types that cannot yet cross the bridge.

CKSyncEngine.RecordZoneChangeBatch.init(pendingChanges:recordProvider:)

This Swift callback must itself suspend asynchronously. (nonthrowing, so a rejected promise cannot reach swift)

CKShare.AccessRequester.contact

The iOS SDK compiler rejected this binding: reference to member 'contact' cannot be resolved without a contextual type

CKShare.BlockedIdentity.contact

The iOS SDK compiler rejected this binding: reference to member 'contact' cannot be resolved without a contextual type

CKShare.Participant.init()

inherited init: clang: 'init' is unavailable

CKQuery.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

CKShare.init()

inherited init: cannot prove legal (class declares 4 custom initializers)

CKShare.AccessRequester.init()

inherited init: clang: 'init' is unavailable

CKShare.BlockedIdentity.init()

inherited init: clang: 'init' is unavailable

CKUserIdentity.LookupInfo.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

CKQueryOperation.Cursor.init()

inherited init: clang: 'init' is unavailable

CKRecordZone.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

CKAsset.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

CKContainer.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

CKShare.Metadata.init()

inherited init: clang: 'init' is unavailable: Obtain `CKShareMetadata` from `CKFetchShareMetadataOperation` or platform-specific scene / app delegate callbacks.

CKDatabaseNotification.init()

inherited init: clang: 'init' is unavailable

CKNotification.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

CKQueryNotification.init()

inherited init: clang: 'init' is unavailable

CKRecordZoneNotification.init()

inherited init: clang: 'init' is unavailable

CKFetchRecordZoneChangesOperation.ZoneConfiguration.init()

inherited init: cannot prove legal (class declares 1 custom initializer)