I have been trying to add core data. And every time I got the same error:
error: filename \"EntityName +CoreDataClass.swift\" used twice: \'/Users/userName/
Xcode 8 includes automatic NSManagedObject
class generation when the model file uses the Xcode 8 file format. If you create your own subclass files, you're creating duplicates. The second file in the error message, in DerivedSources
, is the one that Xcode created automatically.
If the automatically generated files do what you need, just stop creating your own and you'll be OK.
If you want to create your own subclasses instead, you can either