
我想有这个项目结构:
项目名
-楷模
-Controllers
-vIEws
-服务
<key>DeFinitions</key><dict> <key>VIEws/RootVIEwController.h</key> <dict> <key>Group</key> <string>Controllers</string> <key>Path</key> <string>RootVIEwController.h</string> <key>TargetIndices</key> <array/> </dict> <key>VIEws/RootVIEwController.m</key> <dict> <key>Group</key> <string>Controllers</string> <key>Path</key> <string>RootVIEwController.m</string> </dict> <key>en.lproj/RootVIEwController.xib</key> <dict> <key>Group</key> <string>VIEws</string> <key>Path</key> <string>RootVIEwController.xib</string> </dict> <key>en.lproj/MainWindow.xib</key> <dict> <key>Group</key> <string>VIEws</string> <key>Path</key> <string>MainWindow.xib</string> </dict> <key>Services</key> <dict> <key>Group</key> <string>Services</string> <key>Path</key> <string>Services</string> <key>TargetIndices</key> <array/> </dict></dict><key>Nodes</key><array> <string>en.lproj/MainWindow.xib</string> <string>VIEws/RootVIEwController.h</string> <string>VIEws/RootVIEwController.m</string> <string>en.lproj/RootVIEwController.xib</string> <string>Services</string></array>
视图组已创建,因为文件已添加到此文件夹.
服务组也已创建,但其中有一个名为“服务”的文件(没有扩展名).
解决方法 我想我迟到了一点,但我得到的答案是我自己测试的.你几乎是正确的,你只需要删除文件夹的组密钥. XCode将自己创建组.例如,仅服务的代码将如下所示:
<key>DeFinitions</key><dict> <key>Services</key> <dict> <key>Path</key> <string>Services</string> </dict></dict><key>Nodes</key><array> <string>Services</string></array>
就是这样,我希望它会帮助你或其他任何人.
万一有人想尝试创建示例项目的另一个选项然后重命名所有文件名和内容,请在我正在使用的bash脚本下面找到附件:
#!/bin/bash -e# Read the settings from the projectread -p "Project's name: " project_nameread -p "Class prefix: " class_prefix# Set variablesdate="$(date +%d-%m-%Y)"year="$(date +%Y)"username="PLACE_YOUR_name_HERE"organization="PLACE_YOUR_ORGANIZATION_name_HERE"# copy the base project template to a new folder with the projects namecp -r ___PACKAGEname___/ $project_name# Rename files and folders to match the project namecd $project_name# Match the project namefor file in $(find . -depth -name '*___PACKAGEname___*')do dir="$(dirname "$file")" old="$(basename "$file")" new="$(echo "$old" | sed s/___PACKAGEname___/"$project_name"/)" if [ "$new" != "$old" ]; then mv "$dir"/"$old" "$dir"/"$new" fidone# Add the class prefixfor file in $(find . -depth -name '*___VARIABLE_classprefix___*')do dir="$(dirname "$file")" old="$(basename "$file")" new="$(echo "$old" | sed s/___VARIABLE_classprefix___/"$class_prefix"/)" if [ "$new" != "$old" ]; then mv "$dir"/"$old" "$dir"/"$new" fidone# Modify the content of the filesfor file in $(find . -depth -type f ! -name .DS_Store ! -path "*Externals/*" ! -name "*.png" ! -name "*.xcuserstate" )do filename="$(basename "$file")" if [ "$filename" != '*.DS_Store*' ]; then echo $filename sed -e "s/___PROJECTname___/${project_name}/g" $file > temp sed -e "s/___FulLUSERname___/${username}/g" temp > $file sed -e "s/___DATE___/${date}/g" $file > temp sed -e "s/___ORGANIZATIONname___/${organization}/g" temp > $file sed -e "s/___YEAR___/${year}/g" $file > temp sed -e "s/___PACKAGEname___/${project_name}/g" temp > $file sed -e "s/___VARIABLE_classprefix___/${class_prefix}/g" $file > temp mv temp $file fidone 在这种情况下,我首先创建了示例项目,然后我将其称为___PACKAGEname___,之后我只更改了文件中的一些其他字段,例如日期,以便能够使用脚本更改它们.
这段代码是在2013年4月创建的,所以自从我上次使用它以来已经有一段时间了,现在我没有那么多时间来检查并检查一切是否正常.但如果其他人对这项工作感兴趣,我想我将能够找到一个差距,将所有内容上传到Github.
总结以上是内存溢出为你收集整理的ios – Xcode 4模板,创建空组全部内容,希望文章能够帮你解决ios – Xcode 4模板,创建空组所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)