Creating sub-groups in XCode 4 Templates

I've tried many times modify the TemplateInfo.plist and I've also tried to make a sub group and put files in them. Finally I found the solution:

Definition section:

<key>Definitions</key>
<dict>
    <key>main.h</key>
    <dict>
        <key>Path</key>
        <string>main.h</string>
        <key>Group</key>
        <array>
            <string>parent</string>
            <string>child</string>
        </array>
    </dict>
</dict>

in the node section:

<key>Nodes</key>
<array>
    <string>main.h</string>
</array>

The code above will create groups parent and child. and the main.h is in the child

Project
--parent
---child
----main.h

Tags:

Xcode

Xcode4