Search code examples
iosicloudcloudkitkey-value-store

Difference between CloudKit and Key-Value Storage


What is the difference between iCloud's "Key-value storage" and CloudKit?

An example scenario would be: if one were to sync a sizable array containing dictionaries, arrays, and other objects. Would the developer want to use CloudKit or Key-value storage?


Solution

  • CloudKit is for syncing real data records as well as assets (files).

    iCloud's key-value storage is essential NSUserDefaults but synced across devices.

    So think of it that way. If it's a simple value you might store in NSUserDefaults, use key-value storage. If it's actual data you might store in a plist, database, file, or core-data, use CloudKit.