Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why xcode can't see these files, however they physically exist

Tags:

Xcode run into compilation error while running the code.

Unfortunatetly I was not able to find a solution online.

These steps that I have commenced:

=> git merge branch-name => can't find the files => git checkout branch-name file-name => files were physically found => xcode can't see it

??? enter image description here

like image 530
Jackie Chan Avatar asked Jul 12 '13 08:07

Jackie Chan


People also ask

Where can I find Xcode files?

In xcode on left pane in the project navigator at the bottom there is a search field. In the documentation it is called filter bar. According to Inder Kumar Rathore the shortcut is ⌘ + ⇧ + O .

How do I add external files to Xcode project?

I include them in the project by right-clicking on the project folder in the project view in Xcode, and selecting "Add Files to ...". I then navigate to the folder containing the source files, click on the folder and select "Add." With the options "Create folder references" and "Add to target [target name]".


2 Answers

You have to add them to your project at File -> Add Files To "Your Project"

btw: Your project folder in Xcode does not necessarily reflect your actual folder structure you see in finder.


Edit:

if you want it to be like that (Xcode folders are the same as the existing folders in your harddrive) I found a nice tool which does that for you: https://github.com/venmo/synx

also, when creating new folders/groups in Xcode, you have to use the New Group with Folder option to also create a folder for that group on your harddrive.

like image 151
Heckscheibe Avatar answered Sep 20 '22 19:09

Heckscheibe


Tested in xcode 11

You have to add them to your project by pressing right-click on the app folder Add files to "app"... select all the missing and NEEDED files, click on create groups option and press finish.

Adding missing files to xcode

like image 34
Khaled Jamal Avatar answered Sep 23 '22 19:09

Khaled Jamal