Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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 ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top