Reputation: 311
I have a custom Xcode project template which generates a project and adds los of Swift boilerplate source files in custom folders. My problem is that I can only create group folders like this: , which represents a Group not associated with a file system directory. It's not good because if you later rename a folder in Xcode, it will have no effect on the corresponding file system directory.
My goal is to write an Xcode project template that adds my custom boilerplate swift files in real reference folders like this:
Please help me to achieve this. Thank You :)
Upvotes: 3
Views: 1287
Reputation: 158
Here is my solution. In the node section specify the group before naming the file.
<key>Nodes</key>
<array>
<string>MyGroup/File.swift:comments</string>
<array>
Next in the definitions provide the group name in the key like so:
<key>Definitions</key>
<dict>
<key>MyGroup/File.swift</key>
<dict>
<key>Path</key>
<string>File.swift</string>
<key>Group</key>
<string>MyGroup</string>
</dict>
Hopefully this will help.
Upvotes: 2
Reputation: 1846
For me it works on right click. However, if it already is a Group with folder it will display New Group without Folder
Upvotes: 0