---
title: CloudKit
framework: CloudKit
role: collection
role_heading: Framework
platforms: [iOS 8.0+, iPadOS 8.0+, Mac Catalyst 13.0+, macOS 10.10+, tvOS 9.0+, visionOS 1.0+, watchOS 3.0+]
path: cloudkit
---

# CloudKit

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

## Overview

Overview The CloudKit framework provides interfaces for moving data between your app and your iCloud containers. You use CloudKit to store your app’s existing data in the cloud so that the user can access it on multiple devices. You can also store data in a public area where all users can access it. Using the CloudKit framework CloudKit isn’t a replacement for your app’s existing data objects. Instead, CloudKit provides complementary services for managing the transfer of data to and from iCloud servers. Because it provides minimal offline caching support, CloudKit relies on the presence of the network and, optionally, a valid iCloud account. A valid iCloud account is only necessary when you want to save data that is specific to a single user. Apps can always store data in a public area that is readable by all users. Records are at the heart of all data transactions in CloudKit. A record is a dictionary of key-value pairs that represents the data you want to save. You can add new keys and values to records at any time, and you can create links between related records to organize your data. The CKRecord class defines the interfaces for managing the contents of records. CloudKit also relies heavily on the use of Operation objects to manage the asynchronous transfer of data to and from the server. Before using CloudKit, make sure it’s the most suitable option for your app. For more information, see Deciding whether CloudKit is right for your app. note: The classes of the CloudKit framework aren’t for subclassing. Use these classes as-is to save, retrieve, and manipulate data in iCloud. In addition, many of the protocols of this framework aren’t for adoption by classes outside of CloudKit and UIKit. Each protocol reference document includes information about whether you can adopt the protocol in your own classes.

## Topics

### Essentials

- [Deciding whether CloudKit is right for your app](cloudkit/deciding-whether-cloudkit-is-right-for-your-app.md)
- [Enabling CloudKit in Your App](cloudkit/enabling-cloudkit-in-your-app.md)

### Schemas

- [Designing and Creating a CloudKit Database](cloudkit/designing-and-creating-a-cloudkit-database.md)
- [Managing iCloud Containers with CloudKit Database App](cloudkit/managing-icloud-containers-with-cloudkit-database-app.md)
- [CKRecordZone](cloudkit/ckrecordzone.md)
- [CKRecord](cloudkit/ckrecord.md)
- [CKRecord.Reference](cloudkit/ckrecord/reference.md)
- [CKAsset](cloudkit/ckasset.md)
- [Integrating a Text-Based Schema into Your Workflow](cloudkit/integrating-a-text-based-schema-into-your-workflow.md)

### Records

- [Local Records](cloudkit/local-records.md)
- [Remote Records](cloudkit/remote-records.md)
- [CKSyncEngine](cloudkit/cksyncengine-5sie5.md)
- [Shared Records](cloudkit/shared-records.md)

### User discovery

- [CKUserIdentity](cloudkit/ckuseridentity.md)
- [CKUserIdentity.LookupInfo](cloudkit/ckuseridentity/lookupinfo-swift.class.md)

### Core objects

- [CKContainer](cloudkit/ckcontainer.md)
- [CKDatabase](cloudkit/ckdatabase.md)
- [CKOperationGroup](cloudkit/ckoperationgroup.md)

### Privacy

- [Encrypting User Data](cloudkit/encrypting-user-data.md)
- [Providing User Access to CloudKit Data](cloudkit/providing-user-access-to-cloudkit-data.md)
- [Changing Access Controls on User Data](cloudkit/changing-access-controls-on-user-data.md)
- [CKFetchWebAuthTokenOperation](cloudkit/ckfetchwebauthtokenoperation.md)
- [Responding to Requests to Delete Data](cloudkit/responding-to-requests-to-delete-data.md)
- [Identifying an App’s Containers](cloudkit/identifying-an-app-s-containers.md)

### Errors

- [CKErrorDomain](cloudkit/ckerrordomain.md)
- [CKError](cloudkit/ckerror.md)
- [CKError.Code](cloudkit/ckerror/code.md)
- [CKErrorRetryAfterKey](cloudkit/ckerrorretryafterkey.md)
- [CKErrorUserDidResetEncryptedDataKey](cloudkit/ckerroruserdidresetencrypteddatakey.md)
- [CKPartialErrorsByItemIDKey](cloudkit/ckpartialerrorsbyitemidkey.md)
- [Record Changed Error Keys](cloudkit/record-changed-error-keys.md)

### Deprecated

- [Deprecated Symbols](cloudkit/deprecated-symbols.md)

### Classes

- [CKShareRequestAccessOperation](cloudkit/cksharerequestaccessoperation.md)

### Variables

- [CKRecordParentKey](cloudkit/ckrecordparentkey-1elhg.md)
- [CKRecordShareKey](cloudkit/ckrecordsharekey-gc8w.md)
- [CKRecordTypeShare](cloudkit/ckrecordtypeshare-7lec1.md)
- [CKRecordTypeUserRecord](cloudkit/ckrecordtypeuserrecord-6iwgn.md)
- [CKRecordZoneDefaultName](cloudkit/ckrecordzonedefaultname-1uuiu.md)
- [CKShareThumbnailImageDataKey](cloudkit/cksharethumbnailimagedatakey-rxjd.md)
- [CKShareTitleKey](cloudkit/cksharetitlekey-1cs9j.md)
- [CKShareTypeKey](cloudkit/cksharetypekey-5m83p.md)
