Create groups vs Create folder reference in Xcode

It took me a while to understand the difference between those two options so I thought I’d share:

I’m writing this when Xcode 12 is the current version

The biggest difference is how the imported folder / file will be accessible from the finder. Let’s say you want to import a new folder to your Xcode project. When you choose Create groups Xcode will import your new folder and create a group (the yellow icon). When you go to your project’s directory (using Finder) you should see a folder named like the one you’ve just imported, but any additional files you put to this folder trough Finder won’t be visible in your Xcode project.

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.

If you want to know more just read this explanation http://www.thomashanning.com/xcode-groups-folder-references/

It’s pretty straightforward and easy to understand.

Leave a Comment