Sans Browser

Flex Support for Xcode 3

November 29th, 2007 by enefekt

Following up on the efforts that a few others had already started (including someone named Robbish who’s blog is gone), I’ve updated the macros and language spec files for ActionScript 3 to work with Xcode 3.

Xcode 3 switched from pblangspec files to xclangspec. The macros format and pbfilespec files had a few tweaks to be made as well. There are a few lines still left in the pblangspec file, Xcode didn’t seem happy without them, or with them moved into the xclangspec file. I wasn’t able to keep the method parameters in the code completion, it wouldn’t properly work with some of the different characters in there. I tried a few things, but it didn’t work. If I or someone else gets that figured out, it will be updated.

As a brand spankin’ new addition, and as a result of Xcode 3 having better support for XML, I was able to get an xclangspec going for MXML too! I even have ActionScript in the CDATA blocks working! It works hand-in-hand with the ActionScript.xclangspec file.

This is a first stab, and no doubt can be improved on, but at least I’m rockin’ and rollin’ with Xcode 3 now. To use, just drop the files here:

If you are moving a project over from an older Xcode project, the ActionScript and MXML files may not automatically register. As you work on them, simply do a “Get Info” (Command+I), and select either “sourcecode.actionscript” or “sourcecode.mxml” for the type in the inspector.

Here you go, enjoy!
Flex for Xcode 3 (0.0.1)

Filed under: ActionScript, Flex, MXML, Mac, Xcode


  1. Will Says:

    nice! thanks so much for providing this…

  2. Andrés Santiago Pérez-Bergquist Says:

    Woot, you rock! Thanks for figuring this out.

  3. Nathan Says:

    I’ve been trying to get this to work for days, and thanks to you, I finally succeeded! Much appreciated! If you figure out how to create Flex Templates in XCode 3, please post (I followed instructions somewhere else, but still haven’t had any luck).

  4. Ben Says:

    Thanks! These will be super helpful.

  5. Greg Says:

  6. enefekt Says:

    Thanks for the link. I’ve been using mtasc with Xcode 2.x for years. Since the Flex SDK came out I haven’t been, unless it’s for maintenance of old projects.

  7. Brico Says:

    This is great. One small thing though. Maybe I’m missing something, but there doesn’t seem to be the quick jump at the top for the methods.

  8. enefekt Says:

    Thanks for the comment! Yep, that’s one of the things that I haven’t figured out yet. I need to take another pass at hackin’ around with this.

  9. Eric Buitenhuis Says:

    Thanks for the work… I’m a Java developer just beginning to dabble with Flex (evaluating Flex vs. GWT). I’m sick of insanely heavy IDEs, and XCode 3 is starting to look more and more attractive. I am also using your work as a howto for writing my own. I’m anxious to read some of your other posts.

  10. David Says:

    Wow…great work! I was starting to try to figure out how to get all this working…then decided to google to see if I might be so lucky as to have someone already do it and post the info. Having the files ready and so easily integrated like you do was more than I’d hoped for!