What is the difference between "Create groups for any added folders" and "Create folder references for any added folders"?
I have been doing this for quite some time now, but to be honest I don't know what's the difference between the two.
Xcode offers several ways to add existing files and folders to your project: Drag the files from the Finder into the Project navigator. Click the Add button (+) in the Project navigator's filter bar, and choose Add Files to “projectName”. Choose File > Add Files to “projectName”.
Those letters beside files in the Project Navigator of Xcode show the status of files that are under version control systems, such as SVN or Git. So, for instance: M - means the file has changed and it should be merged into SCM. A - means this is a new file and should be added to SCM.
It means they are not found on disk where your project believes they should be. Control-click and Show In Finder to see the folder location to locate the file and drag it back in to the project, and delete the bad reference.
It should by located in: ~/Library/Developer/Xcode/DerivedData .
Groups are only within your project and are for organization purposes only. They do not reflect what is on the file system nor where the files will be compiled into in the app.
Folders are basically like including a folder on the file system, where if you move a file within a folder reference, it will be reflected in your project as well. These folders are also reflected inside your app bundle when its compiled.
I usually use groups. For example, on the file system I have all my classes in a /Classes folder but have them separated in my project into groups, such as View Controllers, Custom Views, Data Model, etc. These don't really need to be separate in the file system but its nice to have in the project.
Sometimes I'll use folder references if it's important for the organization be maintained once it goes to the app bundle, but that is pretty rare. Also, when including files from a third party library that could be updated often, you can use a folder reference so you don't have to remember to add files when they are added to the library.
When you create folders in your project the folders are also present in you apps bundle. Groups are ignored and all files in the groups are added to the apps bundle root.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With