Search code examples
cloudkitquota

How to get the actual quota for CloudKit?


Im using Cloudkit and the private database to store some files to iCloud and sync between iOS und OSX. Now I wanted to implement something, the user can see how much space is left in his iCloud without leaving the app and look in the preferences. But I cant't find any information how to get this data. The whole CloutKit Framework reference has no object or method that gives me this information.

Because the private database uses the normal iCloud quota of the user, I could work around by looking for this data over any other iCloud API.

Anybody has an hint for me or a way to get this infos?


Solution

  • There isn't currently a way to get the remaining quota for a user in the private database at this time, so your best option is to just try to upload the data you want and watch for a CKErrorQuotaExceeded error.