From 9657dcbc9d1d9085c57a21dfb801a4905675ef57 Mon Sep 17 00:00:00 2001 From: Guilherme Rambo Date: Mon, 15 Apr 2024 14:14:46 -0300 Subject: [PATCH 1/4] Removed print statement --- Sources/CloudKitCodable/CloudKitRecordDecoder.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/Sources/CloudKitCodable/CloudKitRecordDecoder.swift b/Sources/CloudKitCodable/CloudKitRecordDecoder.swift index 029384c..86cd60e 100644 --- a/Sources/CloudKitCodable/CloudKitRecordDecoder.swift +++ b/Sources/CloudKitCodable/CloudKitRecordDecoder.swift @@ -131,8 +131,6 @@ extension _CloudKitRecordDecoder.KeyedContainer: KeyedDecodingContainerProtocol func decode(_ type: T.Type, forKey key: Key) throws -> T where T : Decodable { try checkCanDecodeValue(forKey: key) - print("decode key: \(key.stringValue)") - if key.stringValue == _CKSystemFieldsKeyName { return systemFieldsData as! T } From 09dd47cac12ef27671bc7c461e04f457e91868e5 Mon Sep 17 00:00:00 2001 From: Guilherme Rambo Date: Mon, 15 Apr 2024 14:32:59 -0300 Subject: [PATCH 2/4] Create FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..d973452 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: insidegui From b76b3eb4605dbaab868c9bb545ec7038a41d790d Mon Sep 17 00:00:00 2001 From: Guilherme Rambo Date: Tue, 16 Apr 2024 14:12:53 -0300 Subject: [PATCH 3/4] Ignore asset content type when dynamic --- Sources/CloudKitCodable/CloudKitRecordDecoder.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/CloudKitCodable/CloudKitRecordDecoder.swift b/Sources/CloudKitCodable/CloudKitRecordDecoder.swift index 86cd60e..6ee3cd6 100644 --- a/Sources/CloudKitCodable/CloudKitRecordDecoder.swift +++ b/Sources/CloudKitCodable/CloudKitRecordDecoder.swift @@ -233,7 +233,9 @@ extension _CloudKitRecordDecoder.KeyedContainer: KeyedDecodingContainerProtocol let data = try Data(contentsOf: url) - return try T.decoded(from: data, type: contentType) + /// Don't use dynamic content type (which is the type when `URL` can't figure out its type). + let effectiveType = contentType.isDynamic ? T.preferredContentType : contentType + return try T.decoded(from: data, type: effectiveType) } private func decodeURL(from asset: CKAsset) throws -> URL { From b2b509781217da398fb38de8e17f23a985369767 Mon Sep 17 00:00:00 2001 From: Merrick Sapsford Date: Mon, 2 Sep 2024 11:35:53 +0200 Subject: [PATCH 4/4] Require watchOS 7 --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index c5a8e6a..678d0fc 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,7 @@ let package = Package( .macOS(.v11), .iOS(.v14), .tvOS(.v14), - .watchOS(.v5) + .watchOS(.v7) ], products: [ .library(name: "CloudKitCodable", targets: ["CloudKitCodable"])