Missing file warnings showing up after upgrade to

2019-01-08 03:08发布

I recently upgraded to Xcode 4 (which is a great upgrade) but now I'm getting some warnings that I did not get before. I have looked through forums and other SO posts but have not come across how to fix this.

The warnings I get are project level warnings for a missing file. The files that are being shown have been deleted from the project navigator view (also choosing to delete from file system). However it still seems to be showing up as somehow linked to the project, even though the file no longer appears in the Project navigator.

I have looked around and not found how I can tell Xcode that these files are gone, stop giving me warnings. Here's a screenshot that I get in Xcode4, but never got in Xcode 3.

Missing file warning Xcode 4

21条回答
beautiful°
2楼-- · 2019-01-08 03:57
  1. Commit and push your changes.
  2. Restart Xcode.
查看更多
放我归山
3楼-- · 2019-01-08 03:58

I used the following way to deal with tha issue:

Launch the terminal and cd to the project directory. (ex: cd /Users/Mauro/Src/Pippero-1.2/ )

Then enter the following command:

find . -name .svn -exec rm -rf { } \;

the command will recursively search for files (and folder) called .svn and delete them

查看更多
够拽才男人
4楼-- · 2019-01-08 03:59

This worked for me:

File -> Source Control -> Hide Working Copy Status

then

File -> Source Control -> Show Working Copy Status

查看更多
萌系小妹纸
5楼-- · 2019-01-08 04:02

I didn't have to do anything. I committed my code and pushed it up. Turned off XCODE. Pulled it down again and everything just worked.

查看更多
欢心
6楼-- · 2019-01-08 04:03

Dont delete the file directly in your .xcode folder. Delete files from xcode project navigator. (Right click on that file and choose move to trash).

Now, To clear this issue add same files in same location. And delete from the project navigator.

查看更多
Summer. ? 凉城
7楼-- · 2019-01-08 04:03

Overview:

In my case there was an xcode Project called Sample in the following folder path /folder1/folder2.

There was a .git file inside /folder1/folder2/Sample/ which is expected.

Root cause:

There was another .git file in the parent directory (/folder1) which was causing the issue. The folders might have been deleted leaving behind the .git file

Solution

rm -rf /folder1/.git

Clue

If moving your project to a completely new location fixes the issue where there was no .git file in the parent directories up the hierarchy then it is a clue that the above solution could work.

查看更多
登录 后发表回答