I had a file which I deleted and replaced with another file, somewhere else, of the same name.
Despite cleaning, and trying this multiple times, I keep getting this
In case everything fails (i.e. first try bames53 suggestion)
Ok, this might be dangerous so make a copy of your whole project first:
project.pbxproj
in a text editor of your choice, but not Xcode640450991409CF5C00B3B580
. Search for this and delete any line you find.Add file…
dialog of Xcode. It is still in the folder of your project — if you added it successfully in the first place — you just got rid of all project references.And remember: make a copy of your whole project first — for every try. or copying the project.pbxproj
might be enough.
I had this error in monodevelop. I just went to edit>preferences and changed the default location of the program files. It was set to the monodevelop default they give you when you open a file and not the folder i changed it too. Likely, you need to adjust the settings of xcode, where you stored your files.
I was seeing this while setting up a React Native project. Solved it using:
sudo xcode-select --switch /Applications/Xcode.app
Source
The problem might be because your project > target > Build Phases > Compile Sources is trying to compile a file that doesn't exist. It might be in there twice, like the below screen shot. My project contains UIImage+FFXtras, I can even remove it and re-add it and this won't resolve the problem!
I'm not sure how the project gets into this state - but I know it's not obvious what is going wrong. Highlight the red problem one and remove it.
So have a look in compile sources phase for the file clang is complaining about.