In Xcode IDE when I add a new group named 'Organizer' inside the default Classes group it is getting created. But when I physically see the folder in the Finder, that new group Organizer is not showing as a folder.
Actually I want to maintain the sources in a particular structure i.e, how it exists in the XCode view.
What should I do to achieve this?
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. It's pretty straightforward and easy to understand.
A folder in Xcode represents a folder in the file system. A group in Xcode is a "fake" folder which does NOT represent a folder in the file system. It is common to use a combination of groups and folders for a given Xcode project. Save this answer.
You should create all necessary folders within Finder and then add them to project (right mouse click -> Add files to XYZ project). While adding files, options should look like this:
UPD: Xcode 9 finally supports automatic folder creation and file reordering for groups operations!
If you are adding a new group named Organizer
inside the default classes group you cant see the physical folder in finder. To make physical folder you should do following steps,
1. Prepare folder structure with files in it. 2. Drag that folder into xcode i.e. project navigation pan. 3. Check the box " Copy items into destination group's folder (if needed) " 4. Select " Create groups for any added folders "
After doing this, you will get your folder in finder. Now if you want to add new file then just
1. Right click on folder and click " Add files to < Project_Name >" 2. Select proper file 3. Check the box " Copy items into destination group's folder (if needed) " 4. Select " Create groups for any added folders " 5. Finally click to add
You will get that folder with new file added into that.
Note : Keep in mind you get yellow colored folder.
Thank You.
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