Xcode: Issue "File Xxx.Png Is Missing from Working Copy" at Project Building

Missing file warnings showing up after upgrade to Xcode 4

These solutions are way too difficult. The problem is that you have removed the project from filesystem but SVN still thinks they are there.
Detaching project from SVN will work, the same for removing .svn folders BUT that is going to destroy your repository!

It is much easier to open console, browse to your folder ("cd /pathToYourFolder") and type the following command:

svn delete nameOfMissingFile

If the name of your missing file includes the @ character (eg: retina-specific artwork), ensure the file name terminates with the @ symbol:

svn delete nameOfMissingFile@2x.png@

For GIT repositories:

git rm nameOfMissingFile

Many files missing from working copy in Release-iphonesimulator

I finally solved this. It WAS version control related. I had tried committing and resetting status, with no luck. However, when I tried a Pull, it said I had uncommitted changes, even though I had just committed. Therefore, I tried Discard All Changes, and that solved it. Did a clean and build and the warnings are now gone.

Swift 3 / Xcode 8 Upgrade - 100's of DerivedData files missing from working copy errors

I was facing the same warnings after updating to Xcode 8 GM, over 350. Most of them where .swift files and images in the asset catalog.

It is basically a Source Control issue that seems to mainly appear when you move/delete project files. These are either new warnings or Xcode 8 is just a lot more strict with source control than Xcode 7.

After googling about this I found some answers, but they seemed complicated to me e.g using command line or even suggesting turning source control off and back on.

Here is what worked for all my projects.

Short Way

Try this first and if it does not work than do the long way

1) Go to Source Control menu (top menu next to window and help) and click Refresh Status

2) Go to Source Control menu again and click commit

3) The commit window should open with all the commits Xcode thinks are necessary. So just enter a commit in the text field box and press the commit button.

Repeat step 1-3 until there are no more items selected by Xcode when you open the commit menu. Do not go to step 4 until all the items automatically selected by Xcode have been committed otherwise you might get an error when doing step 4.

4) Open the commit window again and as mentioned in step 3 there should be no more items selected by Xcode. However you should still see some items in the left sidebar which are the ones causing the warning messages.

Right click on a item and press select all, enter a commit in the text field and than press the commit button. Everything should complete and the warning/errors should go away (optionally press CommitMenu->Refresh Status again).

If it does not complete than close/reopen Xcode and than redo step 1-4.

If that also does not work than the long way should fix it.

Long Way

If you use source control and make commits regularly than optionally do step 1 and than you should be able to go straight to step 11.

1) Clean xCode derrived data (Optionally)

You usually dont have to do this so skip this step on your 1st attempt and go to step 3.

Go to Xcode preferences, click on the "locations" tab, and then go to advanced. Click on the little arrow next to the advance button to open the path to the derived folder. Close Xcode completely and than delete all content that is in that derived folder.

As member Krivvenz has so kindly pointed out in his answer you might have to optionally do this. I did not have to do this myself so maybe skip this and only try it if it doesnt work.

"I also had to change my DerivedData option from relative to Custom which can be found in Xcode > Preferences > Locations Tab."

2) Relaunch your Xcode project and wait for the indexing to finish. This might take a few minutes because you just deleted the derived data.

3) Go to Source Control menu (top menu next to window and help) and click Refresh Status

4) Go to Source Control menu again and click commit

5) The commit window should open with all the commits Xcode thinks are necessary. I had over 250 as I never used source control before.

6) Click on commit changes at the bottom right

7) I got an error and the operation did not finish (if it works for you than go to 11)

8) Go to Source Control menu and click Refresh Status

9) Go to Source Control and click commit

10) Click on commit changes at the bottom right. This time it suggested about 30 commits less and I got no errors. If you still get errors on your 2nd attempt try closing Xcode completely and than reopening it and than repeat this step.

11) Go to Source Control menu and click Refresh Status

12) Go to Source control menu and click commit

13) This time there should be no changes recommended by Xcode but you will still see a lot of files in the commit menu on the left (unticked). Its these files that are throwing the working copy warnings, which should also still be there.

14) Select every one of those files in the left sidebar of the commit menu.
You can right click and press check all

15) Click on commit changes at the bottom right

16) I got an error and the operation did not complete. So I tried again and same error, so I closed the commit menu. If it completes for you thats fine too.

17) Go to Source Control menu and click Refresh Status

Boom all the warnings disappeared.

18) Close your project and Xcode completely

19) Open your project again

20) Go to Source Control menu and click Refresh Status

21) Go to Source Control menu and click commit

22) I suddenly had 150+ commits suggested again. Make sure all suggestions are selected and than click on commit and it should complete without errors.

23) Clean your project (Product->Clean)

24) Go to Source Control menu and click commit. There should be no changes required and there should also be no files in the left sidebar.

After all this I have no more warnings, didn't need to delete source control and everything is working again as usual.

If you get more errors in the future, say because you moved a file again, than just make commits again, making sure everything is selected.

Hope this helps.

Workspace missing linked files from working copy

I found it. I'm new to Xcode so I didn't realize what it really means. It's source-control related. I had those files checked in previously but not they are not needed and Xcode manages it but then complains that I don't have them locally but do have them in SVN. I had to commit those "deletions" and all is well.

Figured I won't delete question, maybe it will help another newbie



Related Topics



Leave a reply



Submit