timpone
timpone

Reputation: 19939

want to use Xcode 4 for everything, how to add folder in project navigator?

I'd like to move my web dev editing to Xcode 4 (currently using textmate). I have a couple of simple questions that are clearly a lack of experience on my end.

  1. In Xcode's Project Navigator, how do I add a folder to the shown directory tree? Currently, I add via terminal and do File -> Add Files

Is there any way to tell Xcode to see the file system as the file system and not as references?

a less likely thing:

  1. Is there any way to bring up a console within the context of a folder in project navigator (would like to be able to run grep again small portion or something)?

thx

Upvotes: 4

Views: 3563

Answers (2)

brainray
brainray

Reputation: 12884

As far as I know, Xcode won't mirror the filesystem as an Xcode tree (anyone correct me id I'm wrong). Wanting to have an identical structure is quite some work. I use to first place the files hierarchically in the file-system, then I mimic the same structure in Xcode. This requires some attention since Xcode 4.1 not always writes new classes to the place you told him to - they may prefer to land in the highest level of the Xcode project.

I had similar thoughts and started a thread, might be helpful for further reading

Your second question: sorry, can't help you there.

Upvotes: 1

Swift Dev Journal
Swift Dev Journal

Reputation: 20088

I can answer the first question. Adding a folder of files to a project is the same as adding individual files. Choose File > Add Files in Xcode. When you add a folder of files to a project, you should see something like the following screenshot:

enter image description here

Create groups if you need to access the files in Xcode, such as adding a folder of source code files. Create folder references if you don't need to access the files in Xcode, such as adding a folder of audio files.

You can also add folders to the project navigator by selecting a file or folder in the project navigator, right-clicking, and choosing New Group.

Upvotes: 6

Related Questions