Search code examples
iosstorageicloudprivatecloudkit

Is privately-stored data in CloudKit stored on the user's iCloud account?


My app involves users to create data and save it to their private database. Would the data take up space in their iCloud account, or will it be a part of my CloudKit storage quota? Thanks!


Solution

  • This is covered in the Designing for CloudKit document:

    Each container is divided into public and private databases, each of which is represented by a CKDatabase object. Any data written to the private database is visible only to the current user and is stored in that user’s iCloud account. Data written to the public database is visible to all users of the app and is stored in the app’s iCloud storage.

    So the private database goes against the user's iCloud account and their quota.

    The public database goes against your app's iCloud account. You can see how your app gets allotted space in iCloud at https://developer.apple.com/icloud/