I use Xcode 9.0. Some folders icons in my Xcode project have dark triangles in bottom left corner - for example, \"0. Login\", \"Frameworks\", \"Products\", \"Pods\". What d
The introduction of yellow folders with a triangle ( ) in Xcode 9 coincides with the additional new feature which allows a Project Navigator Group to be directly associated with a file system directory.
The Xcode 9/10 yellow folders with a triangle ( ) represents a Group not associated with a file system directory. Thus, an Xcode 9/10 yellow folder-with-a-triangle Group ( ) is the same as an Xcode 8 plain yellow Group ( ) …since prior to Xcode 9, Project Navigator Groups could not be expressly associated with a file system directory.
In Xcode 9/10, a file system directory association can be expressly added to or removed from a Project Nagivator Group with the File Inspector. The triangle will toggle on or off to indicate whether a file system association is present for the Group.
Click File Inspector folder icon to add a file system "Containing directory" association to a group:
Click the File Inspector Clear path
⊗ to remove a file system directory association from a group. Or, click the folder icon to change the file system "containing directory" association to a group:
The Xcode > File > New menu or Project Navigator context menu can add Groups in the following ways:
Note that the appearance of Group with Folder
and Group without Folder
is context sensitive.
New Group
: creates an empty group of the same group type as the current uppermost selection in the Xcode Navigator. The opposing alternative of Group with Folder
or Group without Folder
will also appear on the same menu.New with Group
: ( ) creates an empty group and creates an associated "containing" file system directory.New Group without Folder
: ( ) creates a new empty group without any file system directory association.New Group from Selection
: creates a group of the same type at the current Xcode Navigator seletion.
Group with Folder
( ) creates an empty group and creates an associated "containing" file system directory AND moves the selected items into the newly created "containing" directory in the file system.Group without Folder
( ) creates an group which references the selection without creating any new folder in the file system.Additionally, with the new Xcode 9 features, the drag and drop of a file system directory onto the project navigator will create Groups ( ), and sub Groups ( ), that are each associated with the corresponding original file system directory.
The Xcode 9 release notes notes that a Group with associated file system directory also have the following new beharviors:
Dragging files between groups in the Project Navigator moves the files in the filesystem and updates any associated SCM working copies.
When a group is connected to folder in the filesystem, creating, renaming, and deleting groups updates the corresponding files and folders in the the filesystem.
Blue referenced folders are useful for non-source-code assets which need to be copied into a target bundle during the build process.
When dragging an existing folder to Xcode, an option is provided "Create folder references" for the added folder.
"Create folder references" will create a blue folder in the project navigator. And, the contents of the folder will also be added. "SomeReferencedFolder" was added in the following Example.xcodeproject
which contained ABC.pdf
.
In this macOS Example application case, the referenced folder and the referenced folder content are copied into the Example.app bundle. The copy occurred as part of the build process since "Add to targets: Example" was checked.
Note: Xcode 9 & Xcode 10 groups behave the same.
Folders without dark triangles exist as a group in your project and also (what is new in Xcode 9) exist as a folder in file structure.
Example: After double-click in your project navigator you can see menu:
For New Group Xcode create group in project navigator and create folder in file structure (in finder) and of cource for New Group without Folder create only group.