Had a similar problem (but arrived on this page looking for answers).
I deleted the file link in Xcode, which I really wanted to save, but the file still existed in finder.
Even if the file is in the correct folder, Xcode will not confirm it until you re-add it through File> Add Files to "Your Project"
What I am doing is that the files in the folders of the code project and those that are really included in the Xcode project are two different things.
source share