Search code examples
xcode4project-template

How to add folder reference in XCode 4 Project Template


i have some problems about adding folder reference in xcode 4 project template, i just can add Groups and Sub Groups to project. does anyone successed doing this? please share here..

here's the code that i use to add Group:

<key>Definitions</key>
<dict>
    <key>main.h</key>
    <dict>
        <key>Path</key>
        <string>main.h</string>
        <key>Group</key>
            <string>css</string>
    </dict>
</dict>

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

that code just generate Group not a Folder Reference...please help me

*sorry my english a bit strange, haha


Solution

  • If you want your file to be added to a folder, then you should reference it with its full desired path everywhere you define it (namely in the definitions and in the nodes section)

    <key>Definitions</key>
      <dict> 
        <key>css/main.h</key>
         <dict>
           <key>Path</key>
           <string>main.h</string>
           <key>Group</key>
           <string>css</string>
         </dict>
    
    <key>Nodes</key>
     <array>
      <string>css/main.h</string>
     </array>