7

Recently I found out that I can get rid of tons of boilerplate code by creating my own Xcode file templates, but then I thought, that it would be cooler to create group with all files stored inside this group. However, I didn't find any solution. Only one answer that was close to my question was Creating sub-groups in XCode 4 Templates, but I tried it and doesn't work

Contents of my TemplateInfo.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Kind</key>
    <string>Xcode.IDEFoundation.TextSubstitutionFileTemplateKind</string>
    <key>Description</key>
    <string>An empty Swift file.</string>
    <key>Summary</key>
    <string>An empty Swift file</string>
    <key>SortOrder</key>
    <string>30</string>
    <key>DefaultCompletionName</key>
    <string>File</string>
    <key>Platforms</key>
    <array>
        <string>com.apple.platform.iphoneos</string>
    </array>
    <key>Definitions</key>
    <dict>
        <key>___FILEBASENAME___.swift</key>
        <dict>
            <key>Group</key>
            <string>Group1</string>
            <key>Path</key>
            <string>___FILEBASENAME___.swift</string>
            <key>TargetIndices</key>
            <array/>
        </dict>
    </dict>
    <key>Nodes</key>
    <array>
        <string>___FILEBASENAME___.swift</string>
    </array>
</dict>
</plist>
Richard
  • 97
  • 8
  • what, specifically, doesn't work about it? also, please add the output of `find -type f ~/Library/Developer/Xcode/Templates/` to your question. – mr. fixit Dec 19 '20 at 23:03
  • You find solution for this when type is TextSubstitutionFileTemplateKind? For me not work when using type TextSubstitutionFileTemplateKind – Pablo Ruan Apr 05 '21 at 21:38

0 Answers0