如何获得CloudKit的实际配额? [英] How to get the actual quota for CloudKit?

查看:166
本文介绍了如何获得CloudKit的实际配额?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Cloudkit和私有数据库将一些文件存储到iCloud,并在iOS和OSX之间进行同步. 现在,我想实现一些东西,用户可以在不离开应用程序的情况下查看iCloud中剩余的空间,并查看首选项.但是我找不到任何有关如何获取此数据的信息.整个CloutKit Framework参考没有提供给我此信息的对象或方法.

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.

因为私有数据库使用了用户的正常iCloud配额,所以我可以通过在任何其他iCloud API上查找这些数据来解决此问题.

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?

推荐答案

目前,尚无办法在私有数据库中获取用户的剩余配额,因此,最好的选择是尝试上传所需的数据,并注意CKErrorQuotaExceeded错误.

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.

这篇关于如何获得CloudKit的实际配额?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆