I did not managed to translate my working iOS8 code snippet into iOS 9 Swift 2 Xcode version 7.0 beta (7A120f).
My last attempt was:
saveRecordsOperation.perRecordCompletionBlock {
(record:CKRecord, recordID:CKRecordID, error:NSError) -> Void in
print("perRecordCompletionBlock \(record)")
}
But Xcode says:
AppDelegate.swift:929:34: Cannot invoke 'perRecordCompletionBlock' with an argument list of type '((CKRecord, CKRecordID, NSError) -> Void)'
Any idea?
Ok, here is the solution:
There where two issues actually: one I introduced while dealing around to find a solution when I desperately added recordID, while the second was we now must use equal sign to pass the code block.
Hope it helps.