Not everyone have the use case to add new sub folder in their iOS project. But when some one do, it s kinda confusing for developers to do that. “Add new Group” is not same as “Adding a sub folder”.
When I started looking into adding the sub folder, it took me at least an hour to figure that small thing out. May be its just because I am not the best. So, I decided to write this post to help other developers to become the best and do the same thing in 15 minutes which took me an hour to do.
Adding a Group is more of cleaning the project organization. You want to “group” the similar files together, but it does not mess up your project build. It just makes your code look more organized and easy for you find the related files in the same group. If you Right click on the project and “Show in finder”, these groups will not show up in the project directory.
But there is a different steps you need to follow in order to create a sub folder in the project directory. Note: These subfolders don’t even show up in the project hierarchy while you are looking at your xcode project. But, when you Right-click on the project > Show in Finder, you will see the subfolders in there.
step 1-4으로 하면 실제 폴더도 생기고 화일도 있으나 xcode에 보여지지 않는다. 그래서 옮기려는 폴더를 그대로 드래그해서 navigator에 드랍했다. Steps to add a sub folder: 1) Right click on the project > Show in Finder
2) Click on the project 3) Add “New Folder” 4) Drag and drop the files into that folder 5) Come back to the Xcode project, on the left side: click on the file you just added. *At this point, your new file might show up in red color, since xcode is not able to find the location of the file you just added inside the folder. 6) On the right side, under the File Inspector. 7) Change the path for the file which you added to the new folder by clicking the folder icon (circled).