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:
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.
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”.
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.
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.
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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With