I was getting this for a core data model .xcdatamodeld, It turned out the model file was listed under both "Compile Sources" & "Copy Bundle resources" in Build Phases. Removed it from the latter and it build in Xcode 10 finally!
File -> Workspace Settings -> Change New Build System to Legacy.It worked for me .
Faced same problem. Resolved it using following
go to Target -> Build Phases
Check if your file is appearing in both Compile sources and Copy Bundle Resources section, if yes remove it from Compile Sources