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条回答
家丑人穷心不美
2楼-- · 2019-01-08 03:50

All the above didn't work to solve the same kind of issue I had. Doing some search, I understood that the issue I had was related to SVN conflicts.

I found out that there were conflicts using the command line:

svn status

Then all conflicted files had to be resolved

svn resolved filename1 filename2 ...

Once the conflicts resolved, the warnings were gone from Xcode

查看更多
Root(大扎)
3楼-- · 2019-01-08 03:52

Go in to the appropriate directory and run:

svn revert fileName
查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-01-08 03:52

The answer by Alex fixed my issue of missing files.

I had one other problem ( though it is not related to missing files, i feel this would be the better topic)

  1. I needed to copy a set of images into my project.
  2. I simply created a group (though i know that group doesnt map to the physical folder) and dragged the images into the group (selected "Copy to.." option).
  3. SVN status showed all of them in "A".
  4. Now when I went into actual file system, I found that all images where copied to the root folder of my project. As it didnt look well, I created a physical folder inside the images folder in my project and copied all the added images there.
  5. SVN then showed all files in red.
  6. I deleted the references of all the red files.
  7. With the "Add File" option, I then added the images from the newly created folder.
  8. Now SVN fails to show status of the files as "A", and no way I can check them in.
  9. Tried out many steps like trashing them adding again from a different folder etc, but there wasnt any luck.

I fixed this by going directly into the repository, create a new directory under images so that the physical folder is now in the SVN server

I then took an update of the source, and got the newly created directory inside my working copy (though it is not added to the project).

I then copied the images to that directory and added them to the project using "Add File" option, which brought me back the "A" status and I was able to check in the files.

Just wanted to share this.....because it took a lot of time from me.

-anoop

查看更多
霸刀☆藐视天下
5楼-- · 2019-01-08 03:53

In Xcode5 & Xcode6, below steps worked for me

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

then

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

查看更多
Animai°情兽
6楼-- · 2019-01-08 03:55

I had that bug and found no way to solve it other than creating an empty file on that position and then deleting it. It happened with files I had deleted from the project, and cleaning, building, deleting manually the Derived Data directory didn't work either. I believe it is a bug, and that it can be quite painful if it happens with more than a few files.

查看更多
劫难
7楼-- · 2019-01-08 03:57

It has something to do with .svn hidden folders in your project.

I solved this issue by detaching the project from svn.

a. Open terminal and type the following commands:

defaults write com.apple.finder AppleShowAllFiles TRUE


killall Finder

This will allow you to view the .svn folders inside your project

b. Delete every .svn folder in your project folders/subfolders

c. Re-enable hidden files:

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder

d. Now your project is detached from svn and you no longer get build issues.

e. Re-add your project to svn or whatever.

I'm a beginner myself and this was my way of dealing with that issue, so I'm not sure this is the best way to go. Anyway, the problem was solved.

查看更多
登录 后发表回答