How to fix missing file warnings in Xcode 8

Xcode 8 has this annoying habit to show missing files as warnings. This is happening when we delete a file that is referenced by a project using Finder rather than remove it using Xcode.

Technically it’s the git version control that complains about the missing files, not Xcode. However, since git says “yo, there’s a conflict between what should be and what is”, Xcode tells us this as a warning.

Be that as it may, how do we fix it before going insane? Lucky for us, it’s easy to fix. Here’s how.

Open a Terminal session and cd into your project directory. In here, simply type

git add .

As soon as you press Enter and return to Xcode, all those nasty warnings are gone. What we’ve done here is to say to git, “listen, this is the new state of the directory, please ignore what you think it should be”.

There should be no response from git, which is good news. All we see is no more missing file warnings in Xcode, and appropriate A and D icons in front of new and removed files as a result.





Leave a Reply