3

Does Xcode support any kind of built-in scripting? I am looking to automate the branding of a base app (creating a new target, adding files to the target, setting target properties) so that it can be executed by a script.

The project currently uses AppleScript to automate (most of) the process, but in practice it seems very flaky and unreliable as it is literally scripting key presses and user-interface interaction. Is there a better way to programmatically interact with Xcode, or its project files?

1 Answer 1

3

You can use the Apple Script dictionary provided by Xcode.

  1. Open AppleScript Editor.
  2. Choose "Open Dictionary..."
  3. Find and select Xcode

You will see something like this:

enter image description here

So there are lots of structured APIs for you to manipulate. Happy coding!

Xcode Project Suite looks particularly promising... If Xcode 4 does not implement these methods, maybe you want to go back to Xcode 3? But most likely that is not an option.

Sign up to request clarification or add additional context in comments.

2 Comments

Unfortunately, most of the Xcode 4's AppleScript API is documented, but not implemented...
and if something is documented but not implemented, file a bug with Apple ( via bugreporter.apple.com ). The more developers who complain, the more likely it is Apple will devote resources to fixing their developer tools to work as they're supposed to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.