Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: project navigator, difference between Yellow folder and blue folder

Tags:

xcode

ios

I want to know the difference between a blue folder and a yellow folder in Xcode.

enter image description here

I found this but doesn't clarify my doubts!

like image 526
Fry Avatar asked Nov 12 '12 15:11

Fry


People also ask

What does blue folder mean in Xcode?

Blue is used to represent a "Folder Reference".

What does a red folder mean in Xcode?

It means they are not found on disk where your project believes they should be. Control-click and Show In Finder to see the folder location to locate the file and drag it back in to the project, and delete the bad reference.

What is project Navigator in Xcode?

The Project navigator displays your project's files and lets you open, add, delete, and rearrange those files. To open the Project navigator, at the top of your project window's navigator area, click the icon that resembles a file folder.


1 Answers

Yellow folders are "Groups", they are not actual folders but references to folders/files. They exist only to organize your project in Xcode. Blue folders are actual folders existent in the file system.

Blue folders give you the benefit of not having to "Add File" everytime something new lands in the folder i.e. an image. However, you should still mostly use groups (aka yellow folders) because it gives you more control on what will be bundled with your app (think of hidden files in the folder/versioning files). Also, sometimes blue folders can mess up your file hierarchy in your bundle, ie. causing the splash screen to malfunction. There are only a few cases where you would use blue folders, like a "content" folder, where anything in the folder should be packed with the bundle (as Mark Szymczyk commented, images or videos). If you're not sure, stick with yellow folders.

like image 190
JiaYow Avatar answered Sep 28 '22 07:09

JiaYow