Overview
CloudKit is the backend Apple runs inside iCloud for third-party apps. Each app gets a container with a public database, a private database per iCloud user and a shared database for records shared through CKShare; data is organised as typed records in zones, with subscriptions that push changes to devices. Private data counts against the user's own iCloud storage rather than the developer's bill, which is why so many indie and Apple-platform apps use it as their only backend. Core Data and SwiftData can mirror into it automatically, and CKSyncEngine (iOS 17, 2023) handles the hard parts of incremental sync for custom stores. The catch is reach: it is tied to Apple IDs and Apple platforms, with only CloudKit JS and web services for the browser, and querying is far simpler than a general database.
Strengths & trade-offs
Strengths
- +Private data is stored in each user's iCloud quota, so per-user storage costs the developer nothing
- +No sign-up flow: users are already authenticated with their Apple ID
- +Core Data and SwiftData sync to it with NSPersistentCloudKitContainer and almost no code
- +CKSyncEngine (iOS 17+) manages change tokens, batching and retries for custom sync
- +Sharing between users is built in through CKShare and the share sheet
- +Encrypted fields in the private database for sensitive data
Trade-offs
- −Only works for users with an Apple ID; Android and other platforms are second-class
- −Simple predicate queries only: no joins, aggregates or server-side logic
- −Schema must be promoted from development to production in the CloudKit Console
- −You cannot export or self-host it; migrating off means rebuilding sync elsewhere
Great for
- +Syncing app data across a user's iPhone, iPad and Mac
- +Indie and Apple-only apps that want a backend without servers
- +Collaborative documents and lists shared between iCloud users
- +Core Data or SwiftData apps that need cloud backup and sync
Think twice for
- −Cross-platform apps with Android or web-first users
- −Analytics, reporting or complex queries
- −Server-side workloads that need a general-purpose database
Capabilities
Native or official first-party support · 10 of 25 tracked
Scale & consistency
- Comfortable data size
- Large · ≤ 1 PB
- Horizontal scaling
- Native
- Multi-region
- No
- Transactions
- Limited ACID
- Consistency
- Eventual, Strong
- Schema
- Flexible
- Architecture
- Serverless, Distributed
- Query languages
- CKQuery (NSPredicate)
Private data scales with the user base because it lives in each user's iCloud account; Apple advertises up to 1 PB for the public database. Apple does not document regional placement or replication.
Deployment
Ecosystem
Alternatives to Apple CloudKit
Google's app platform: Firestore, Realtime Database and Data Connect, plus auth, functions and hosting.
apple-cloudkit vs firebase →Serverless document database with realtime listeners, offline SDKs and a new Enterprise edition.
apple-cloudkit vs google-cloud-firestore →Open-source Postgres backend platform: database, auth, storage, realtime and edge functions in one project.
apple-cloudkit vs supabase →Object-oriented mobile database whose MongoDB sync service is gone; the local engine survives as open source.
apple-cloudkit vs realm →Sync engine that keeps on-device SQLite in sync with Postgres, MongoDB, MySQL or SQL Server.
apple-cloudkit vs powersync →Embedded JSON document database with SQL++ queries, vector search and sync to Couchbase.
apple-cloudkit vs couchbase-lite →Apple CloudKit FAQ
What is Apple CloudKit?
Apple CloudKit is a document database by Apple, first released in 2014. CloudKit is the backend Apple runs inside iCloud for third-party apps. Each app gets a container with a public database, a private database per iCloud user and a shared database for records shared through CKShare; data is organised as typed records in zones, with subscriptions that push changes to devices. Private data counts against the user's own iCloud storage rather than the developer's bill, which is why so many indie and Apple-platform apps use it as their only backend. Core Data and SwiftData can mirror into it automatically, and CKSyncEngine (iOS 17, 2023) handles the hard parts of incremental sync for custom stores. The catch is reach: it is tied to Apple IDs and Apple platforms, with only CloudKit JS and web services for the browser, and querying is far simpler than a general database.
Is Apple CloudKit open source?
No. Apple CloudKit is proprietary, closed-source software.
Does Apple CloudKit support ACID transactions?
Partly. Apple CloudKit offers limited ACID guarantees (for example, single-record or single-partition transactions), with eventual, strong consistency.
Does Apple CloudKit scale horizontally?
Apple CloudKit scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at large scale (≤ 1 PB).
How can I run Apple CloudKit?
You can use the vendor's managed cloud and run it serverless. Managed offerings include CloudKit.
What is Apple CloudKit best for?
Apple CloudKit is a strong fit for syncing app data across a user's iPhone, iPad and Mac; indie and Apple-only apps that want a backend without servers; and collaborative documents and lists shared between iCloud users. Think twice for cross-platform apps with Android or web-first users.
What are the best alternatives to Apple CloudKit?
Common alternatives to Apple CloudKit include Firebase, Google Cloud Firestore, Supabase, Realm (Atlas Device SDK) and PowerSync. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is Apple CloudKit?
Apple CloudKit ranks #116 of 844 databases on the WhichDB Score (25.8/100), and #13 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.