You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.
it happens in ObjectToRecordConverter.swift on line 73:
privatefunc convertOperations(from objectSet:Set<NSManagedObject>, changeType:ManagedObjectChangeType)->[ObjectToRecordOperation]{varoperations=[ObjectToRecordOperation]()
for object in objectSet {
// Ignore entities that doesn't have required service attributes
guard let serviceAttributeNames = object.entity.serviceAttributeNames else{ continue }do{letrecordWithSystemFields:CKRecord
if let restoredRecord =try object.restoreRecordWithSystemFields(){
switch changeType {case.inserted:
// Create record with same ID but wihout token data (that record was accidently deleted from CloudKit perhaps, recordID exists in CoreData, but record doesn't exist in CloudKit
letrecordID= restoredRecord.recordID
recordWithSystemFields =CKRecord(recordType: restoredRecord.recordType, recordID: recordID)case.updated:
recordWithSystemFields = restoredRecord
}}else{
recordWithSystemFields =try object.setRecordInformation()}varchangedAttributes:[String]?
// Save changes keys only for updated object, for inserted objects full sync will be used
if case .updated = changeType { changedAttributes =Array(object.changedValues().keys)}letconvertOperation=ObjectToRecordOperation(record: recordWithSystemFields,
changedAttributes: changedAttributes,
serviceAttributeNames: serviceAttributeNames)
convertOperation.errorCompletionBlock ={[weak self] error inself?.errorBlock?(error)}
convertOperation.conversionCompletionBlock ={[weak self] record in
guard let me =selfelse{return}letcloudDatabase= me.database(for: record.recordID, serviceAttributes: serviceAttributeNames)letrecordWithDB=RecordWithDatabase(record, cloudDatabase)
me.convertedRecords.append(recordWithDB) // <--- here Can't form Range with upperBound < lowerBound
}
operations.append(convertOperation)}catch{errorBlock?(error)}}return operations
}
The text was updated successfully, but these errors were encountered:
I often get crashes with this error:
Can't form Range with upperBound < lowerBound
it happens in
ObjectToRecordConverter.swift
on line 73:The text was updated successfully, but these errors were encountered: