Xcode 12 beta 6 Core Data generated source yields compilation errors

I have a project (macOS Swift/SwiftUI Core Data app) that compiles and runs fine in Xcode 11, but the latest release of the Xcode 12 beta yields two compilation errors in the Core Data generated classes.

The errors are both "Redundant conformance of <class> to protocol 'Identifiable'" because the classes inherit said conformance from NSManagedObject. These two classes happen to be the only two out of 12 that inherit directly from NSManagedObject.

Will file a bug; any workarounds?

TIA
hi,

not sure it's a bug, as such. (it's a feature!)

if you had an NSManagedObject in Xcode 11 with an id attribute, to make it Identifiable you would likely add an extension to the class in your own code to say that it conforms to Identifiable (without doing anything special).

Xcode 12 seems to sense that you have an id field (that's Hashable) as an attribute and adds its own extension to the class to say that it's Identifiable in its generated file.

just remove your own addition of conformance to Identifiable.

hope that helps,
DMG
Xcode 12 beta 6 Core Data generated source yields compilation errors
 
 
Q