CloudKit - partialFailure and limitExceeded

304 views Asked by At

Summary

In CloudKit would like to know all the possible CKError.Code possible for a .partialFailure.

Presently I am only handling the following CKError.Code for a partialFailure.

Assumptions:

  1. .serverRecordChanged //Only applicable while saving records
  2. .zoneNotFound //Only applicable while fetching zones
  3. .unknownItem //Only applicable while fetching items
  4. .batchRequestFailed //Only applicable while saving records in custom zone

Questions:

  1. For partialFailure, are the above stated the only possible error codes ?

  2. Are the errors serverRecordChanged, zoneNotFound, unknownItem only possible as part of partialFailure error ? (Would the error returned by the completion handler not directly contain serverRecordChanged, zoneNotFound, unknownItem but only partialFailure error may contain them ?)

  3. Are my comments regarding when each of the above error correct ? (Only applicable while...)

  4. Is limitExceeded error thrown for CKFetch operations and CKModify operations or is it only applicable for CKModify operations ?

1

There are 1 answers

0
Adolfo On
  1. Partial Failure means that some of the CKRecords involved in an operations has failed, and maybe others finished without problem. Error could be one from the CKError structure

  2. No. Those errors could happend in a CKDatabase.save ot CKDatadabe fetch operation.

  3. +- ;-)

  4. limitExceeded could happend on save or modify. For Fetching It's iCloud server which informs clients (you) when are more records waiting to be fetched. For example, the CKFetchNotificationChangesOperation has the property moreComing which indicates that you need to make another fetch operation.