Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the location of files in xcode project?

Tags:

I put some files on the same level of *.xcodeproj file carelessly. When I move these files into the right location in Finder, Xcode tells me that these files are missing. So I delete the group which contains these files whose names have been read (I realize it is a mistake). And I drag these files from Finder into the xcode to build a new group. But when I try to run the project, Xcode still can't find these code. How can I solve the problem?

like image 963
icemelon Avatar asked Sep 26 '13 06:09

icemelon


People also ask

Where are Xcode files stored?

It should by located in: ~/Library/Developer/Xcode/DerivedData . Show activity on this post. You can configure the output directory using the CONFIGURATION_BUILD_DIR environment variable.

How do I create a folder in Xcode project?

Select the items and choose File > New > Group from Selection, or Control-click the selected items and select New Group from Selection. Rename a file or group. Double-click the file or group, and enter the new name. Change a group's associated folder.


2 Answers

When you see a file that is red (or in the wrong place), you can easily correct the location of these files by using the file inspector (which appears along the right side panel of your Xcode window).

It looks like this:

Use File Inspector to fix path

Clicking on the Folder icon next to the name will bring up an open panel from which you can choose the correct location of the file.

like image 76
Michael Dautermann Avatar answered Oct 17 '22 01:10

Michael Dautermann


There is an easier way to re-organize files through the Xcode project. You can use Synx, it automatically fixes file paths, through the Xcode project groups.

You can check Github page for Synx

Synx

After intalling Synx just run the command below

synx path/to/my/project.xcodeproj

like image 39
accfews Avatar answered Oct 17 '22 03:10

accfews