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

I found the answer.

3 things

1 removed the reference to the red files then dragged them back into the project relinked all my .m and .h files just incase

2 then removed the .app reference and dragged it back in to the project.

3 removed any duplicates or red files in the build phases

Fixed Thanks everyone for your suggestions and help


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.


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

Tags:

Xcode