开发者

Xcode custom project template creates only references to files

I tried to create 开发者_如何转开发a custom project template for setting up unit testing.

The problem is that when i create a new project based on this template it creates references to the template files :

When i edit a file, it changes my template files instead of my actual project files ! When i delete my template, files from my actual project becomes red !

The project template is in :

/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/Application/Test-based Application

Reading some question on stack overflow i tried to install my template project in

/Library/Application Support/Developer/Shared/Xcode/Project Templates

But i cannot see my template when i create a new project.

Can anybody help ?

Thanks, Vincent


You might be interested in my Xtemplate project on GitHub. It’s a simple script that will set up a new Xcode project with decent defaults, it features a unit testing target with OCMock.


there are several reasons but the most important is because your template info plist identifier is not unique! as you said you have put the template in /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Project Templates/Application/Test-based Application and then moved the same template in other place. xcode has seen the identifier number in the first location and ignores the second. change the identifier and give it a try. why dont you try the main template folder:library/developer/xcode/templates ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜