How to create new project in XCode using AppleScript?
I want to do a simple task with XCode and AppleScript:
- I want to create a new project
- Save created project with desired name in desired folder.
Can someone tell me how can I achieve it using AppleScript??
You can't do this directly, but you can do it by setting up a template project which you then use to create new projects. There are some useful details on doing this here.
This gist shows how to use AppleScript to create a new C++ project. You could probably adjust it to create whatever type of project you're interested in. Note that is uses UI scripting, which is not very friendly, but that is about all Xcode 4 supports.
I tried to archieve the same and the solution for me was just to create a dummy project folder find all places, where you have to rename the project name (and the bundle identifier) and on running your script just copy this folder and rename project name and bundle identifier. Dirty but easy.