Search code examples
xcodemacosfinder

Xcode, add folder to project that retains directory structure and update automatically


I have folder that I would like to include in my Xcode project, but I would like it to retain it's structure (subfolder, etc). When I drag it into the resources in Xcode it expands that folder into a group in the Xcode project.

I would also like it to retain it's structure so I can add and remove files without re-adding the modified folder to the project constantly.


Solution

  • When adding your package, select the option to "Create Folder References for any added folders". Xcode will create a reference to the directory, and notice changes every time you rebuild the package.

    alt text