folder structure in xcode vs folder structure in finder

后端 未结 6 497
广开言路
广开言路 2021-02-01 05:59

I have the following folder structure in xcode for a project.

\"file

相关标签:
6条回答
  • 2021-02-01 06:38

    You should managed it yourself in Finder, then set new Path for folders in Utility View
    Xcode folder path

    0 讨论(0)
  • 2021-02-01 06:41

    I recently discovered a Command Line Tool that will do exactly what you need. You can find it here:

    https://github.com/venmo/synx

    To install the tool, you just need to open the terminal and run the following command (use sudo to run it as a superuser and get permission):

    $ sudo gem install synx
    

    Then, just like the instructions on the GitHub webpage above indicate, use the following command to re-organize your folder structure:

    $ synx path/to/your/project.xcodeproj
    

    This should do it :).

    0 讨论(0)
  • 2021-02-01 06:42

    After version 9 Xcode (haven't checked previous versions) handles this for you! As long as you create a group and you don't select "New group without folder" Xcode automagically creates a corresponding folder in your project that will be reflected in your project's file structure.

    0 讨论(0)
  • 2021-02-01 06:43

    You can do this to some extent! There's just one extra step to do every time you create a new group (and this first time you'll have a lot of catching up to do!):

    • Xcode 3: Whenever you create a group in Xcode, immediately get info on it, and notice the "Path:" setting just below its name. Click "Choose..." and set it to a new folder with the same name.
    • Xcode 4: Whenever you create a group in Xcode, immediately select it and open the righthand sidebar. Notice the "Path:" setting just below its name. Click the icon next to "None" (what is that, a file in a window?) and set it to a new folder with the same name.

    Now, whenever you add files to the group, they'll head to the corresponding folder on disk. Woo!

    Hence, I always create folder in Finder and then add that in Xcode.

    0 讨论(0)
  • 2021-02-01 06:50

    The "folders" in Xcode are actually groups and not necessarily linked to a folder in Finder.

    You need to manage it yourself if you want a mirror in Xcode/Finder.

    What you can do is create the folder structure you desire in Finder, then drag each folder into Xcode, this will create references to the folders as groups in Xcode and any files you create in those groups will be saved in the appropriate Finder folders.

    0 讨论(0)
  • 2021-02-01 07:02

    Check out this article. It might help you organise your project. http://www.blackdogfoundry.com/blog/xcode4-folder-structure/

    0 讨论(0)
提交回复
热议问题