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/
Follow these steps,
Disable automatic generation for each entity individually by setting the "Codegen" setting to "Manual/None" for the entity.
Change entity name to something else to get it to save. For example change the class name; build; change the class name back; build again.