Xcode 文件模板未正确创建
我在 Xcode 4 中遇到自定义文件模板的问题。
例如,使用 cocos2d 模板,当我尝试在项目根目录创建一个名为 GameLayer 的新 CCLayer 文件时,它会在 .xctemplate/CCLayer 中生成文件/Gamelayer.h
和 .xctemplate/CCLayer/Gamelayer.m
这些文件似乎是正确的,但它们位于错误的位置,并且未添加到项目中。
我已经使用 Cocos2d 文件模板以及 这篇文章。我尝试自己创建的任何模板似乎也有同样的问题。
I'm having an issue with custom file templates in Xcode 4.
For example, with the cocos2d templates, when I try to make a new CCLayer file called GameLayer at my project root, it generates the files at .xctemplate/CCLayer/Gamelayer.h
and .xctemplate/CCLayer/Gamelayer.m
The files seem to be correct but they're in the wrong place and they weren't added to the project.
I've tried this with the Cocos2d file templates as well as the Kiwi template from this post. Also any templates I try to create myself seem to have the same problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,这个问题是由于我的 ~/Libary/Developer/ 是指向不同驱动器的符号链接以节省 SSD 空间而引起的。无论 Xcode 在从模板创建文件时做什么,都会出现符号链接问题。
Turns out the issue was being caused by the fact that my ~/Libary/Developer/ was a symlink to a different drive to save space on my SSD. Whatever Xcode does when creating files from templates has problems with symlinks.