Every time I add NSManagedObject subclass to a vanilla app (with CoreData enabled) or to a vanilla app without CoreData enabled at the start but added after, Xcode (10.2.1) / Swift (4.2) is throwing up 3 errors.
I'm trying to create a simple application in Xcode v10.2 (have just updated to 10.2.1) that uses Core Data. I have tried to do this by two methods ie. starting a brand new app and ensuring Core Data is ticked, and also starting a vanilla app without Core Data ticked and then adding Core Data. The issue I'm having is occurring after I create an entity and some entity attributes (everything compiles fine up to that point every time), however the issue occurs as soon as I go to add NSManagedObject subclass from the Editor dropdown.
As soon as I've added NSManagedObject, Xcode reindexes and I get 3 errors, two stating that "Multiple commands produce...." and another one that states Command CompileSwiftSources failed with a nonzero exit code.
I've tried to recreate the NSManagedObject, however that makes no difference. I have followed the instructions to add a build statement (SWIFT_ENABLE_BATCH_MODE set to NO), but it makes no difference.
I'm not trying to do anything fancy here, just get to a point where I have NSManagedObject subclass enabled as part of CoreData so that I can get on and write the rest of my app on Xcode 10.2/Swift 4.2.
Also I have just updated to Xcode 10.2.1 which has made no difference ie. problem still occurs when you try and add the NSManagedObject subclass.
Any ideas anyone?