Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: issue "file xxx.png is missing from working copy" at project building

Tags:

file

xcode

ios

People also ask

How do I fix Xcode file not found?

Delete the files from the xcode project navigator (only deleting references). Add them again to the project (dragging from finder into the project navigator).

How do I add missing files to Xcode?

Select all the missing files that are in one folder in Finder. Click the choose file button; it is under the Location drop down menu; it is an image that looks like a very small window with a document inside it. A Choose folder containing the selected references sheet should appear.

What does a red folder mean in Xcode?

It means they are not found on disk where your project believes they should be. Control-click and Show In Finder to see the folder location to locate the file and drag it back in to the project, and delete the bad reference.


The warning will disappear as soon as you commit your changes (Xcode 8).


It seems that this problem may have different causes, but it's often in relation with source control software.

In my case, I solved it by going to Git, and adding the files again. I mean running the following command:

git add .

You can also disable source control by unchecking

Xcode -> Preferences -> Source Control -> Enable Source Control

if you're managing it via command line or any other app.


In XCode -> SoureControl:

Update + Refresh Status did it for me.


In my case, the file was missing from the source control.
To fix, I had to discard this file (be careful only discard the missing file not all your project):

  1. Xcode->Source Control->commit
  2. Right Click the missing file
  3. Choose Discard Changes