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 sopartialFailurewould not contain operation level errors such asnetworkUnavailable/badContainer/badDatabase. - Please refer to see how
partialFailureis 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,unknownItemonly possible as part ofpartialFailureerror ? (Would the error returned by the completion handler not directly containserverRecordChanged,zoneNotFound,unknownItembut onlypartialFailureerror may contain them ?)Are my comments regarding when each of the above error correct ? (Only applicable while...)
Is
limitExceedederror thrown forCKFetchoperations andCKModifyoperations or is it only applicable forCKModifyoperations ?
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.