Find missing files in xcode

I am rebuilding the material / files in my file system for my xcode projects, and so when I open the project, all the files are red. I can manually add the file one at a time, but is there any way for xcode to quickly find these files for me? All files are in one folder.

+7
source share
4 answers

As far as I know, Xcode is not able to automatically find moved files. You can reconnect the link to your file using the inspector (panel on the right), but this is somewhat tedious for this. In your case, it would probably be faster to just delete the links and then add the files back to your project.

+5
source

If you have a bunch of missing (red) files that now live in the same directory, you can improve the "fix each path individually in the inspector" method by selecting (Cmd-click) all the files in one go. In the inspector you will see "several values":

Xcode screenshot: Multiple Values

Clicking the button in the Location drop-down list will lead to the directory selector - note that the prompt says "Select a folder containing ..." rather than "Select file and location".

enter image description here

+6
source

I agree with the answers already received. In a real situation or as a last resort, you can open the project file in a text editor and fix the links on the path manually.

  • Close the project in Xcode
  • Backing up a project file in a safe place
  • In Finder, right-click the project file and select "Show Package Contents"
  • Drag the project.pbxproj file to BBEdit (or TextEdit or something else)
  • Edit any links you need "path = xxx"
+1
source

In this case, I do the following steps:

1) Add a new group called Res

2) Click "Add files to ..."

3) Find the resource folder and press CMD + A

4) Check the box "Create folder links for any added folders." And in the source code I use for example. "Fonts / font1.xml".

5) Then, for the update, I simply delete the links of the Res group

6) And follow steps 1 to 4

I hope it will be useful

0
source

All Articles