From 482b05c84620e13dba5ca0892aaa393193a9b9b5 Mon Sep 17 00:00:00 2001 From: James Sutula Date: Thu, 19 Mar 2026 22:24:45 -0700 Subject: [PATCH] Rename CKRecord.setValue overload to setBytes to fix unexpected Xcode 26.4 overload resolution --- .../SQLiteData/CloudKit/CloudKit+StructuredQueries.swift | 4 ++-- Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift | 2 +- .../SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift b/Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift index c03123a1..861e40b3 100644 --- a/Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift +++ b/Sources/SQLiteData/CloudKit/CloudKit+StructuredQueries.swift @@ -190,7 +190,7 @@ } @discardableResult - package func setValue( + package func setBytes( _ newValue: [UInt8], forKey key: CKRecord.FieldKey, at userModificationTime: Int64 @@ -252,7 +252,7 @@ let value = Value(queryOutput: row[keyPath: keyPath]) switch value.queryBinding { case .blob(let value): - setValue(value, forKey: column.name, at: userModificationTime) + setBytes(value, forKey: column.name, at: userModificationTime) case .bool(let value): setValue(value, forKey: column.name, at: userModificationTime) case .double(let value): diff --git a/Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift b/Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift index 82e24399..467e85f3 100644 --- a/Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift +++ b/Tests/SQLiteDataTests/CloudKitTests/AssetsTests.swift @@ -285,7 +285,7 @@ recordID: RemindersListAsset.recordID(for: 1) ) remindersListAssetRecord.setValue("1", forKey: "id", at: now) - remindersListAssetRecord.setValue( + remindersListAssetRecord.setBytes( Array("image".utf8), forKey: "coverImage", at: now diff --git a/Tests/SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift b/Tests/SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift index e2b96c39..98601572 100644 --- a/Tests/SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift +++ b/Tests/SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift @@ -716,7 +716,7 @@ let personalListRecord = try syncEngine.private.database.record( for: RemindersList.recordID(for: 1) ) - personalListRecord.setValue(Array("image".utf8), forKey: "image", at: now) + personalListRecord.setBytes(Array("image".utf8), forKey: "image", at: now) try await syncEngine.modifyRecords( scope: .private, @@ -775,15 +775,15 @@ let personalListRecord = try syncEngine.private.database.record( for: RemindersList.recordID(for: 1) ) - personalListRecord.setValue(Array("personal-image".utf8), forKey: "image", at: now) + personalListRecord.setBytes(Array("personal-image".utf8), forKey: "image", at: now) let businessListRecord = try syncEngine.private.database.record( for: RemindersList.recordID(for: 2) ) - businessListRecord.setValue(Array("business-image".utf8), forKey: "image", at: now) + businessListRecord.setBytes(Array("business-image".utf8), forKey: "image", at: now) let secretListRecord = try syncEngine.private.database.record( for: RemindersList.recordID(for: 3) ) - secretListRecord.setValue(Array("secret-image".utf8), forKey: "image", at: now) + secretListRecord.setBytes(Array("secret-image".utf8), forKey: "image", at: now) try await syncEngine.modifyRecords( scope: .private,