26

I had some files that I removed from my project. They don't show up anywhere when I grep the directory for files or the text inside of the files in my source but when I build my project it reports missing files as warnings. Cleaning and restarting the Xcode does not help.

Any ideas on where to look?

pkamb
  • 33,281
  • 23
  • 160
  • 191
madmik3
  • 6,975
  • 3
  • 38
  • 60

4 Answers4

53

it seems like the issue was related to the files being added but not committed to my svn repository. when i removed them from being added the warning went away.

madmik3
  • 6,975
  • 3
  • 38
  • 60
  • 1
    Argh. In addition (since this was the right direction) I had to erase the `.xcuserstate` file after closing and then re-opening the project. This contained the wrong file references (heaven knows how they got there). Still in XCode 8 - rotten Apple... – qwerty_so Sep 28 '16 at 18:43
  • Bummer - It came back again. Now I added the missing file via Add Files/Don't Copy and then removed the reference. That seemed to clear it finally. – qwerty_so Sep 28 '16 at 19:07
  • 2
    I had similar problem with a git repository. Thanks. – DevAndArtist Oct 22 '16 at 18:04
  • still a thing in Xcode 8.2.1 with Git source control – Brian Ogden Jun 10 '17 at 23:41
2

Check out this post for how to get this warning to go away: Missing file warnings showing up after upgrade to XCode 4

Community
  • 1
  • 1
Scott
  • 16,711
  • 14
  • 75
  • 120
1

just check if Delete an unreferenced image from repository in Xcode can help;
try to delete the app and rebuild.

Community
  • 1
  • 1
Tatvamasi
  • 2,537
  • 19
  • 14
0

Got this error in xcode 8.0 with a git repository. Wanted to split code into a different file - so duplicated the file, added it to the project and then removed most code from the original file. At this point XCode showed an 'i' (missing file) in the project navigator but compiling the project works fine. You can't commit with xcode however since it will show the "missing" file as non-existent in the commit-dialog (even though it is clearly there, selectable and editable in the project navigator).

Easy fix was to just commit all changes externally with sourcetree. The moment it was committed, everything worked fine again in xcode.

kalmiya
  • 2,988
  • 30
  • 38