CoreData generated file problem

Relevant line of the log:

<unknown>:0: error: no such file or directory: '.../Something+CoreDataClass.swift'

or just

error: no such file or directory: '.../Something+CoreDataClass.swift'

Note the +CoreDataClass.swift at the end of the file name.

This is a known Xcode issue, possible solutions: