XCode Flex Application Template

19 04 2007

Following up on my previous post, I’ve been really getting into developing Flex applications lately and thought I’d share my basic Flex Application template I’ve created for Apple’s XCode. The template is based on Josh Buhler’s template but adds a few features that I find pretty handy. Those features include:

  • Controller.as
    Bare-bones AS3 class to act as the main application’s controller.
  • AS3 Class file template
    Simple file template to create AS3 classes
  • Build-and-Run in Safari
    Compiles the flex app and opens it in Safari
  • HTML template
    Simple html template to display swf, includes SWFObject javascript
  • flex_skins.css
    Default css file

Installation is pretty simple. For the Flex Application project, Just copy the “Flash” folder into /Library/Application Support/Apple/Developer Tools/Project Templates/

For the AS3 class file template, copy the “Flash” folder in the “file template” folder into the following location:
/Library/Application Support/Apple/Developer Tools/File Templates/

For code-hinting and auto-complete, download and install these language configurations.

The template assumes you’ve installed the Flex 2 SDK into /Developer/SDKs/Flex/. Follow the directions on Josh Buhler’s page for more details.
Below is a screen-shot of an example application based on the template in XCode.

Flex XCode Template

You can download the template from this location. If you run into troubles don’t be afraid to ask questions using the comments for this post. Cheers, and happy FleXCoding!


Actions

Information

7 responses

14 06 2007
John Robinson

I updated the download link to a more permanent host.

Also I should note that there is a bug in the template where it doesn’t properly direct Safari to the right page, when using “Build and Run”. This only occurs in XCode 2.x. I had originally built the template using XCode 1. I haven’t been able to fix it yet but if anyone has any ideas, let me know in the comments and I’ll update the template.

23 10 2007
Jonathan

Hi John, the link to the template is not working, could you please provide another?

Thanks!

10 12 2007
Jay

I downloaded the zip file but it won’t unzip. Can you make sure that it isn’t corrupted?

Thanks

11 12 2007
john

Unfortunately my file hosting account has died. I’ll try to find a place to host the template soon. Shoot me an email(jrobinso@nycap.rr.com) and I’ll gladly send you the zip.

john

19 08 2008
Simon

Hi.

I’d really like to use xcode 2 for AS3 projects. Could I have the AS3 templates, please?

Also as you mention above Josh Buhler talks about a /Developer/SDKs folder for the Flex SDK but I don’t have this fodler on Tiger. I have xcode 2 and flex 3 installed. (Will this work with Flex 3?)

I found a “Flex Application” folder from Josh’s site but installing it as per his instructions into Project Templates didn’t work.

I’m afraid I’m finding this hard to follow. Is there anywhere I can find all the files I need and some very explicit instructions?

thanks

19 08 2008
Simon

As a brief update to my previous email I now understand that the flex sdk can go anywhere and creating an SDKs folder is left up to the person installing.

I would still love the AS3 Project Template please and maybe some idea as to why the template from Josh Buhler that I tried still refuses to show up when placed in the xcode Project Templates folder with all the others. I think I can work the rest out from there.

Many thanks

1 01 2009
Jorge

I tried to download your files, but the link is broken. Could you please send them to me or fix the link?

Thanks

Leave a comment