Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
Fixed CKModifyOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyKJohnson committed Aug 1, 2016
1 parent fbf1aeb commit 0d326d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 8 additions & 3 deletions Sources/CKModifyRecordsOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public class CKModifyRecordsOperation: CKDatabaseOperation {
if let recordIDsToDelete = recordIDsToDelete {
let deleteOperations = recordIDsToDelete.map({ (recordID) -> [String: AnyObject] in
let operationDictionary: [String: AnyObject] = [
"operationType": "delete".bridge(),
"operationType": "forceDelete".bridge(),
"record":(["recordName":recordID.recordName.bridge()] as [String: AnyObject]).bridge()
]

Expand Down Expand Up @@ -209,7 +209,7 @@ public class CKModifyRecordsOperation: CKDatabaseOperation {
#else
request["operations"] = operationsDictionary()
#endif

urlSessionTask = CKWebRequest(container: operationContainer).request(withURL: url, parameters: request) { (dictionary, error) in

// Check if cancelled
Expand Down Expand Up @@ -242,7 +242,12 @@ public class CKModifyRecordsOperation: CKDatabaseOperation {
let error = NSError(domain: CKErrorDomain, code: CKErrorCode.PartialFailure.rawValue, userInfo: [NSLocalizedDescriptionKey: recordFetchError.reason])
self.perRecordCompletionBlock?(nil, error)
} else {
fatalError("Couldn't resolve record or record fetch error dictionary")

if let recordName = recordDictionary["recordName"], result = recordDictionary["deleted"] {

} else {
fatalError("Couldn't resolve record or record fetch error dictionary")
}
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions Sources/CKPredicateReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ struct CKPredicateReader {
currentIndex += source.step
continue
}

print(source.takeString(begin: chunkIndex, end: currentIndex))


switch ascii {
case "\"":
currentIndex = index
Expand Down

0 comments on commit 0d326d2

Please sign in to comment.