Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are there some blue folders in my Xcode project?

Tags:

xcode

When I import my project from Github, I have two folders which appear in Xcode with a blue color, but all the other folders are yellow. What's going on?

like image 380
samir Avatar asked Apr 27 '12 15:04

samir


People also ask

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 create folder references Xcode?

When you choose Create folder references the imported folder will have a classic blue folder icon in Xcode. This new folder will also be visible when you go to your projects directory, but now every new file you put there will also appear in your Xcode project.

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”.


1 Answers

Blue is used to represent a "Folder Reference".

A clear description of what these are and when to use them comes from http://struct.ca/2010/xcode-folder-references/

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. This is great for code, because you’re only going to be working with your code in Xcode. On the other hand, groups aren’t very good for resource files.

On any reasonably complicated project, you’ll usually be dealing with dozens – if not hundreds – of asset files, and those assets will need to be modified and manipulated from outside of Xcode, either by you or a designer. Putting all of your resource files in one flat folder is a recipe for disaster. This is where folder references come in. They allow you to organize your files into folders on your file system and keep that same folder structure in Xcode.

like image 138
rcourtna Avatar answered Sep 28 '22 04:09

rcourtna