CloudKit error handling - retry logic
问题 I want to put excellent CloudKit error handling in my app as Apple wants us to do. I want to save and modify a record right now. Here is my basic save logic... func addNewRecord(managedObj: NSManagedObject) { let newRec = managedObj.convertToCkRecord() publicDB.saveRecord(newRec, completionHandler: saveHandler) } func saveHandler(savedRecord: CKRecord?, error: NSError?) { // handle errors here if let error = error { if error.code == CKErrorCode.NotAuthenticated.rawValue { // debug print("Not