将原始AppDelegate移动到XCode模板中的组

时间:2014-12-02 12:55:10

标签: ios xcode templates project appdelegate

我正在尝试基于Apple提供的单一视图应用程序模板创建Xcode模板。我有一个特定的文件夹结构,我想将AppDelegate移动到项目中的一个文件夹。问题是我无法让它正常工作。当我尝试这样做时(将AppDelegate.h放在我已创建的名为main的文件夹中,但会发生的是它创建一个名为main的新文件夹并将.h文件放在那里。

这是我的尝试: 在我的模板的TemplateInfo.plist文件中,我已将其添加到定义部分

<key>Definitions</key>
    <dict>
        <key>AppDelegate.h</key>
        <dict>
            <key>Group</key>
            <array>
                <string>main</string>
                <string>objc</string>
            </array>
            <key>Path</key>
            <string>AppDelegate.h</string>
            <key>TargetIndices</key>
            <array/>
        </dict>

        <key>main/</key>
        <dict>
            <key>Path</key>
            <string>main</string>
            <key>TargetIndices</key>
            <array/>
        </dict>

        <key>main/objc/</key>
        <dict>
            <key>Group</key>
            <string>main</string>
            <key>Path</key>
            <string>objc</string>
            <key>TargetIndices</key>
            <array/>
        </dict>
     </dict>

在节点部分,我已经添加了这个

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

0 个答案:

没有答案