This is my example workspace with file type
src subfolders and even another subfolder within the
Now let’s have a look at
system.properties. This file bundles the system specific settings and usually won’t need changes at all after your initial setup. Only
YUI_COMPRESSOR_CHARSET will affect the
build.xml. I still don’t know what’s the correct
charset, but my encoding problems might be caused by the editor. I’ll figure that out later…
# SYSTEM PROPERTIES
# Version number separated for easy changes
# Absolut path to YUICompressor home directory
# Absolute path to JAR file (used in build.xml!)
# Charset used with YUICompressor - MAKE SURE THIS IS CORRECT FOR YOUR SYSTEM!!!
project.properties currently only contains the basic workspace structure.
# PROJECT PROPERTIES
# Workspace root relative to build.xml
# Main binary directory
# Main source directory
Finally there is the main
build.xml. I was trying hard to write an understandable documentation. Just follow these steps (also found more detailed within the file):
- Replace the default library name and prefix with your’s.
- Add your source files.
- Choose your browser and html file (works at least with Mac OS X).
- Run the ANT task called YOUR_LIBRARY_PREFIX_run().
Notice that it’s possible to have multiple libraries within a single
build.xml. Simply use different prefixes!
In the end I found most of the core informations at http://www.samaxes.com and http://www.darronschall.com/weblog. Thank you guys! And of course the ANT and YUICompressor manuals accessible through Google ;).
And now I have two question:
- Will you tell me your preferred editor?
- Will you give me a hint according to code organization?
Adobe recently released AIR 2.6 with improved iOS support, so I finally had to get into using ADT with ANT. My editor of choice is FDT so I wanted to do as less extra work as possible. Mainly because I’m no terminal-guy. I need a clean GUI holding my hand while setting up workspaces, linking libraries and stuff like that. In other words, command line and compiler arguments are freaking me out. 😉
I read a lot of blogposts and articles (see link list on the bottom of this post) but most of them compile SWFs using ANT, which means setting source path and stuff like that as command line arguments. But hey, FDT does this already during my daily workflow, so to me it seems natural reusing this within the iOS packaging process.
So I won’t comment a lot what I came up with because all of this can be read on one of the sites below, but show you simply a screenshot of my “IOSAIRTest” workspace structure and of course the ANT files. Notice that I’m not into having different directories for debug, publish, testing and so. I like to have all source files clean and separated by file type (would have an mxml folder too):
You will find the most interesting files in src/ant. Let’s start with
local.properties which just defines the SDK path:
build.properties you setup all params regarding your project:
app.includes=assets icons Default.png Default-Portrait.png
build.xml contains four ways to create the IPA package and the according FDT tasks:
If you’re not sure how to get started with all this AIR 2.6 stuff because it’s currently not integrated in the Flex SDKs – follow this steps:
Loads of linked informations:
http://va.lent.in/blog/2011/03/25/air2-6-app-for-ios/ (Thanks for ANT files!)