Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding files in Xcode 4.2 doesn't work (blue folders, files are not recognized)

In Xcode 4.2, every time I attempt to add folders of files into my project the files are not recognized. Typically, the folder is added and is displayed as a yellow folder in Xcode. But now, every time I add files to my project my folders are blue and they are not correctly recognized by Xcode.

Screenshot:

enter image description here

like image 549
mguniverse Avatar asked Nov 13 '11 07:11

mguniverse


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 files to Xcode?

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 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. Save this answer.

How do I import a folder into Xcode?

Importing into XcodeOpen Xcode and select Open Another Project or File, Open. Open the folder you unzipped from your Dropsource download and locate the file with “. xcodeproj” extension in the root directory. Select the file and click Open.


2 Answers

I meet the same situation after upgrading Xcode to 4.2. My solution is drag the whole folder into Xcode project, and then it will popup a dialog to ask you how to handle it. Choose "Create groups for any added folders" and click finish button. Then it should works and show a "yellow" group folder instead of a blue one. Cheers!

like image 100
firestoke Avatar answered Oct 19 '22 05:10

firestoke


When adding a new file, in the open panel thing, there is a radio button below the outline view with the option to either create groups or create folders for any added folder. Make sure that crate groups is selected.

like image 43
JustSid Avatar answered Oct 19 '22 05:10

JustSid