Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create empty group in Xcode 7 template

I try to create a Xcode template. I followed the question Xcode 4 template create empty group but it doesn't work anymore.

There is only a file called "Application" (without an extension).

TemplateInfo.plist

<key>Nodes</key>
<array>
    <string>Application</string>
</array>

<key>Definitions</key>
<dict>
    <key>Application</key>
    <dict>
        <key>Path</key>
        <string>Application</string>
    </dict>
</dict>

Current result:

Project structure

Expected result:

Expected result

How do I have to change the TemplateInfo.plist so Xcode generates an empty folder called Application and not a file without an extension?

like image 496
ammerzon Avatar asked Jan 20 '16 13:01

ammerzon


1 Answers

In Xcode 8, I wanted to add an empty group for to ensure the template follows a specific scaffolding. Through trial and error, I achieved this by I adding an empty folder in the xctemplate directory, and then configured the node / definition accordingly. I hope this helps :)

enter image description here

<key>Nodes</key>
<array>
    <string>Application</string>
</array>

<key>Definitions</key>
<dict>
    <key>Application</key>
    <dict>
        <key>Path</key>
        <string>Application/</string>
    </dict>
</dict>
like image 171
AntonTheDev Avatar answered Oct 15 '22 11:10

AntonTheDev