Set all CloudKit operations to have a QoS of user initiated
This commit is contained in:
parent
64eec7ad6b
commit
f6ee9d05bc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue