How to get the actual quota for CloudKit?

旧时模样 提交于 2019-12-31 01:56:07

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/27317006/how-to-get-the-actual-quota-for-cloudkit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!