DSDev
DSDev

Reputation: 41

Xcode 4.2 (Snow Leopard) Build Warning "Missing File"

I recently deleted a viewcontroller from my project (both .h and .m files) but know I get a 'missing file' warning every time I build.

Any ideas on this and is it something I need to worry about?

Appreciated

Upvotes: 2

Views: 5615

Answers (5)

Ruchira Randana
Ruchira Randana

Reputation: 4179

I recently faced the same scenario. Adding and deleting did not work for me. However, I added them once more and right clicked on them. Under source control, I Discarded the changes and then deleted the files(Move to trash). This worked for me !!!

Upvotes: 2

JimmyJammed
JimmyJammed

Reputation: 9698

I had a similiar problem. I was trying to delete a .h and .m and I wanted to remove the files entirely, but kept getting errors if I chose "Move to Trash" instead of just "Remove Reference".

Turns out, I needed to just delete each file INDIVIDUALLY. Just add the files back in (if you have them somewhere) and re-delete them one at a time. Worked for me!

Upvotes: 0

Joel
Joel

Reputation: 16134

This is probably a version control issue if you are using svn or git. I had this problem and solved it using the solution provided in this post:

Missing file warnings showing up after upgrade to XCode 4

Upvotes: 4

justin
justin

Reputation: 104708

You likely have a 'dangling reference' in your target's list of files to compile or copy -- check your compile and copy phases for the target which emits the warning.

If it's been physically deleted, the simplest way is usually to enter the file name into the project navigator's search field - look for what Tom detailed - then delete the files from the project(s).

Upvotes: 0

Tom van der Woerdt
Tom van der Woerdt

Reputation: 29985

Ensure that it's not referenced anywhere in the project.

  • Look at the files on the bar on the left, make sure it's not there. Missing files are colored in red.
  • Ensure that none of your files #import the file.

Also, in the future, avoid storing files in parent directories. ../../ isn't something you want to use.

Upvotes: 0

Related Questions