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:
.serverRecordChanged
//Only applicable while saving records.zoneNotFound
//Only applicable while fetching zones.unknownItem
//Only applicable while fetching items.batchRequestFailed
//Only applicable while saving records in custom zone
- Technically partialFailure can throw any
CKError
, but logically partialFailure is a failure at the item level and not at the operation level sopartialFailure
would not contain operation level errors such asnetworkUnavailable
/badContainer
/badDatabase
. - Please refer to see how
partialFailure
is handled - https://developer.apple.com/library/content/samplecode/CloudKitShare/Introduction/Intro.html (Search forhandlePartialError
) -
Questions:
For
partialFailure
, are the above stated the only possible error codes ?Are the errors
serverRecordChanged
,zoneNotFound
,unknownItem
only possible as part ofpartialFailure
error ? (Would the error returned by the completion handler not directly containserverRecordChanged
,zoneNotFound
,unknownItem
but onlypartialFailure
error may contain them ?)Are my comments regarding when each of the above error correct ? (Only applicable while...)
Is
limitExceeded
error thrown forCKFetch
operations andCKModify
operations or is it only applicable forCKModify
operations ?
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
No. Those errors could happend in a CKDatabase.save ot CKDatadabe fetch operation.
+- ;-)
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.