开发者

Creating group in Xcode does not create folder in file system -- why?

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 s开发者_如何学Pythonhould I do to achieve this?


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:

Creating group in Xcode does not create folder in file system -- why?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜