Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode added folder in blue and related there files are not compiling

From Xcode project right click and Add File to "projectName" there I created a NewFolder "ABCD" name and added to same "ABCD" empty folder to the project its in Blue colour, I expected its in Yellow Color, What the files which I added inside Blue Colour folder files are not compiling in X-Code all files which added in Blue Colour folder say file is not found after compiling the code.

Is there any why that default, I added folder are link related to the project?

Its very strange for me this issue, Your feedback is very helpful.

like image 394
KkMIW Avatar asked Jun 27 '17 07:06

KkMIW


People also ask

Why is folder blue in Xcode?

Blue is used to represent a "Folder Reference". There are two types of folders in Xcode: groups and folder references. You can use groups to organize files in your project without affecting their structure on the actual file system.

How do I add folders to Xcode project?

Xcode offers several ways to add existing files and folders to your project: Drag the files from the Finder into the Project navigator. Click the Add button (+) in the Project navigator's filter bar, and choose Add Files to “projectName”. Choose File > Add Files to “projectName”.

How do I fix Xcode file not found?

Delete the files from the xcode project navigator (only deleting references). Add them again to the project (dragging from finder into the project navigator).

How do I add missing files to Xcode?

Select all the missing files that are in one folder in Finder. Click the choose file button; it is under the Location drop down menu; it is an image that looks like a very small window with a document inside it. A Choose folder containing the selected references sheet should appear.


1 Answers

If you simply drag drop a file and choose Create Folder reference, it will add as a blue folder. Please make sure you select "Create groups" from the dialogue and make sure you have selected all the targets in the "Add To Targets" section.

Like this

enter image description here

It will be added as yellow enter image description here

Group-> With groups, Xcode stores in the project a reference to each individual file. This can lead to problems:

Folder references-> Folder references are simpler. You can spot a folder reference because it shows up in blue instead of yellow.

like image 173
Manish Pathak Avatar answered Oct 04 '22 16:10

Manish Pathak