What happens if the free CloudKit limit is reached?

I am thinking of building an app using CloudKit. My question is now what will happen if I reach the free limit. Will I automaticly be charged? Or is the server just not acessible for the user any more?

Replies

To my knowledge, I saw in a session that when you reach your quota limit, an error is returned to any request to the server. So you will not be charged. Additionally, just look at the CKError.LimitExceeded. Hope this helps.

Thank you for your reply. Where should I look at the CKError.Limit.Exceeded? What do you meant with that?

What I meant by the CKError was that it is a class part of CloudKit.


So you will not be charged, instead they want you to handle the error accordingly.

For example (in Swift):

// we have to check to see if it returned an error, if not we succeded
if error != nil {
     // no errors occured
} else if error.code == CKErrorCode.LimitExceeded.rawValue {
     // we have exceeded the limit, so we should handle that
} else {
     // some other error occured, we should handle that as well
}


When you reach your limit, they will send you an email alerting you of this, then you can setup payment. The limit's are quite hard to reach though. If you have any more questions just ask.

I have another question: On the WWDC 2014 Keynote Apple said that there are different data transfer limits for assets and for database and every website I saw confirmed this. But when I look on the CloudKit Website (https://developer.apple.com/icloud/index.html) there is only one data transfer limit quoted which seems to include assets and databases. And when I look on the CloudKit dashboard there is also only one daat transfer limit listed. So has Apple merged both data transfer limits?

Apple has not merged the data transfer limits. They are all on that page you referenced. This is what you start with, with 0-99,999 active users. The limits do change based on your amount of active users. This is what you start with:


10 GB

Asset
storage


100 MB

Database
storage


2 GB

Data
transfer


40

Requests
per seconds

I still find this quite confusing. The CloudKit web site referenced by johjoh shows only a single value for Data Transfer (2 GB minimum, as mentioned by David)... Is this a daily total for asset transfers and database transfers? Other web pages I've seen mention 25 MB/day for asset transfers and only 250 KB/day for database transfers, with those limits increasing by 100 MB & 5 KB respectively for each additional app user. The app I'm working on won't use much in the way of assets, but it will make heavy use of the public database, and I'm concerned that I will run into the database transfer limit rather quickly. If, however, the individual asset & database transfer limits have in fact been rolled into a single 2 GB+ limit, then that would be more than enough for me. I haven't found any official documentation mentioning the limits, other than the above-mentioned page. Can anyone answer this definitively?

I think I now found out what the limits for data transfer are by watching a session recording from the WWDC 2015 (https://developer.apple.com/videos/wwdc/2015/?id=704). There they said that the 2 GB is only for assets and the 40 requets per seconds which are also listed on the CloudKit Website are only for databases. So Apple does not count the bytes you are down - or uploading to your public databases, they count only the requests per second to your public databases.

Oh that's much more reasonable and certainly makes CloudKit a lot more appealing than it would have been otherwise. Thanks for following up with that!