Xcode rearange Files in Finder - xcode

I tried to rearrange my source code files in finder and now xcode shows them as deleted. Is there a way to tell xcode the new location of the file?

Click on the Missing file (turns Red) and go to file inspector. Click on the folder button in file inspector and provide the correct path of the file.
For missing files like this in red.
set correct path as shown below.

Select the file in the left (navigator) panel. In Xcode open the right (Utilities) panel if it's not already open. Now click the "File Inspector" tab. You should see a part that says "Location" with a button that looks like a folder. Click that button and then navigate to the folder where you moved the files to. Bam! Xcode should now see it's there!

Related

Xcode 10 does not show file in Navigation Pane

When I click on a folder in the Navigation pane, and open it in Finder, the file is there, but it's not shown in Xcode and build fails complaining the file doesn't exist. Is there a way to "Refresh" the file structure (the way you would in IntelliJ) or can I only do a drag*drop to fix it?
When I click on a folder in the Navigation pane, and open it in Finder, the file is there, but it's not shown in Xcode and build fails complaining the file doesn't exist.
The project navigator doesn't show you the file system, it shows you the files included in the project. If you need to include a file in the project, then you'll need to add it. You can do that by dragging it into the project, or with the File->Add Files To "..." menu command.

Storyboard file suddenly missing in Xcode

Somehow my storyboard file won't load in my Xcode project. I see the storyboard in the app project from finder, but when I open the Xcode project it's missing and it's red. I tried dragging the file in but it wouldn't show up in Xcode. What's wrong?
Sounds like your directory structure changed without updating the pbxproj file so the filepath is broken. Click on each affect file, open the Utilities pane to the File Inspector, click on the folder icon and select the file in the Finder window that comes up to restore the path.

How to move all images into one group in xcode

All images and header files are looking very confusing. So i want to separate all images and other files into different groups. Anyone please help me
To organize your files on disk, simply make the folders you want to make in the Finder and drag the files to them. To do this, open the folder containing your .xcodeproj file in the Finder. Use Cmd-Shift-N to create a new folder or choose "New Folder" from the "File" menu. You'll be prompted to give the folder a name. You'll probably want to name it something like "Images" or "Headers". Once the folder is created, you can simply click on an image file and drag it to the "Images" folder (or whatever you named it). Repeat the process for any files you want to move.
Once you've done the above, the files may display as red in Xcode's Project Navigator. If that's the case, you need to select the file in Xcode's Project Navigator and show the "Utilities" pane (the right-most button in the toolbar opens and closes the Utilities pane). There are 2 tabs in the Utilities pane - the File Inspector and Quick Help. Click on the File Inspector. It should display the name of your file, the type, and the location. Next to the "Location" is an icon of a folder. Click on the folder and you'll be presented with a file navigation dialog. Navigate to the new location of the file and select it. Click the "Choose" button and the file will be re-connected in Xcode.
You may need to repeat the process for any files you moved into new folders.
In Xcode you can also use 'groups'. A kind of virtual directory structure.
Iu the left xcode column (the Navigator), right click and select 'group'

Xcode 4 file complete path

If I have any file open in Xcode and I would like to know the complete path to the file, how do I do that in Xcode 4? In Xcode 3 I could hover over the file name and get a tooltip with the complete path. I could also right-click a file name at the very top and get a pop-up window with the complete path. This is all gone in Xcode 4.
The annoyance is that when using the Xcode 4 search, it doesn't even show the complete path of the file in the results?!
The only solution I have currently found is to open the save as dialog and get the path from there! That definitely can't be the solution. What am I missing?
For files that are not part of the project you can use the File menu's Show in Finder option.
Update: Xcode 4.2 restored the ability to right-click or command-click on the file's name in the title bar to get a drop-down with the full path.
Show the file inspector utility (normally at the right hand side of the main window on my setup , to do that click the rightmost button of the "View" buttons menu). Click on your file in the navigator and the inspector will refresh with the information. Full path is disclosed and there is a button to open a new Finder window with the enclosing folder.

How to view a file's property in Xcode 4 (used to be command-I)

In Xcode 3, I used to select a file, and press command-I to view the file's property. I frequently have files missing, and hence this will show me the path to the file to fix.
In Xcode 4, command-I no longer works. What can I do?
The new shortcut is Option-Command-1 to show the file inspector.
If the file is missing, you can click on the icon at Location section to re-reference the file.
The only way I could get to it now is select the file, right click, "Open in Finder", then command-I.
The other option is try to see if "File Inspector" in the Utilities sidebar would give you enough information.

Resources