diff --git a/Frameworks/Account/CloudKit/CloudKitZone.swift b/Frameworks/Account/CloudKit/CloudKitZone.swift index 2fda15212..797180e17 100644 --- a/Frameworks/Account/CloudKit/CloudKitZone.swift +++ b/Frameworks/Account/CloudKit/CloudKitZone.swift @@ -239,6 +239,7 @@ extension CloudKitZone { let op = CKModifyRecordsOperation(recordsToSave: records, recordIDsToDelete: [CKRecord.ID]()) op.savePolicy = .ifServerRecordUnchanged op.isAtomic = false + op.qualityOfService = .userInitiated op.modifyRecordsCompletionBlock = { [weak self] (_, _, error) in @@ -351,6 +352,7 @@ extension CloudKitZone { var records = [CKRecord]() let op = CKQueryOperation(query: ckQuery) + op.qualityOfService = .userInitiated op.recordFetchedBlock = { record in records.append(record) } @@ -387,6 +389,7 @@ extension CloudKitZone { var records = [CKRecord]() let op = CKQueryOperation(cursor: cursor) + op.qualityOfService = .userInitiated op.recordFetchedBlock = { record in records.append(record) } @@ -468,7 +471,8 @@ extension CloudKitZone { let op = CKModifyRecordsOperation(recordsToSave: recordsToSave, recordIDsToDelete: recordIDsToDelete) op.savePolicy = .changedKeys op.isAtomic = true - + op.qualityOfService = .userInitiated + op.modifyRecordsCompletionBlock = { [weak self] (_, _, error) in guard let self = self else { @@ -564,6 +568,7 @@ extension CloudKitZone { zoneConfig.previousServerChangeToken = changeToken let op = CKFetchRecordZoneChangesOperation(recordZoneIDs: [Self.zoneID], configurationsByRecordZoneID: [Self.zoneID: zoneConfig]) op.fetchAllChanges = true + op.qualityOfService = .userInitiated op.recordZoneChangeTokensUpdatedBlock = { zoneID, token, _ in savedChangeToken = token