ckerror

Swift / CloudKit: After record changed, upload triggers “Service Record Changed”

拥有回忆 提交于 2020-12-30 07:24:15
问题 I'm trying to add a CKReference to a record in cloud kit, but the attempt keeps triggering "Service Record Changed". From the console messages my println's have shown (console messages and code below), I'm uploading said record with 0 references, then when I attach the reference I'm seeing an attempt to upload the record with 1 reference. Then I'm getting the error. As I understand it, "Service Record Changed" shouldn't be triggered because the values in the Reference List have changed (the

CKError localizedDescription

折月煮酒 提交于 2019-12-30 18:56:07
问题 Aim I would like to display the CKError encountered to the user in the app as an alert. So I would like to extract the string from the error that can be displayed to the user. Note: This question is not about UI code to display. Just want to extract a meaningful string from the error. I tried to use localizedDescription but it doesn't seem to contain an appropriate string Code: Given below are the attempts I made: po error <CKError 0x1c464cea0: "Network Unavailable" (3/NSURLErrorDomain:-1009)

CKAsset in server record contains no fileURL, cannot even check for nil

房东的猫 提交于 2019-12-12 12:19:10
问题 I am testing a sync conflict when I save a record that contains a CKAsset (simply a JPG image) using CKModifyRecordsOperation with a save policy of .IfServerRecordUnchanged . I am getting the error CKErrorCode.ServerRecordChanged . This CKError returns me useful information for conflict resolution, including the CKRecord I tried to save, and the current server version of the record. The first is in error.userInfo[CKRecordChangedErrorClientRecordKey] the second is in error.userInfo

CKError localizedDescription

牧云@^-^@ 提交于 2019-12-01 17:42:31
Aim I would like to display the CKError encountered to the user in the app as an alert. So I would like to extract the string from the error that can be displayed to the user. Note: This question is not about UI code to display. Just want to extract a meaningful string from the error. I tried to use localizedDescription but it doesn't seem to contain an appropriate string Code: Given below are the attempts I made: po error <CKError 0x1c464cea0: "Network Unavailable" (3/NSURLErrorDomain:-1009); "The Internet connection appears to be offline."> po error.localizedDescription "The operation couldn