From e96080bea47170162fe28fcee23c49eb6ba6a42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Wed, 26 Jun 2024 14:59:58 +0200 Subject: [PATCH] Fix Xcode 16 compiler warning ... --- .../PersistentModel/PersistentIdentifier.swift | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Sources/ManagedModels/PersistentModel/PersistentIdentifier.swift b/Sources/ManagedModels/PersistentModel/PersistentIdentifier.swift index bf66e2b..7584eb8 100644 --- a/Sources/ManagedModels/PersistentModel/PersistentIdentifier.swift +++ b/Sources/ManagedModels/PersistentModel/PersistentIdentifier.swift @@ -1,21 +1,27 @@ // // Created by Helge Heß. -// Copyright © 2023 ZeeZide GmbH. +// Copyright © 2023-2024 ZeeZide GmbH. // import CoreData public typealias PersistentIdentifier = NSManagedObjectID -extension NSManagedObjectID: Identifiable { - +#if compiler(>=6) +extension NSManagedObjectID: @retroactive Identifiable, @retroactive Encodable { +} +#else +extension NSManagedObjectID: Identifiable, Encodable {} +#endif + +extension NSManagedObjectID { public typealias ID = NSManagedObjectID @inlinable public var id: Self { self } } -extension NSManagedObjectID: Encodable { +extension NSManagedObjectID { @inlinable public func encode(to encoder: Encoder) throws {