Working with AIR, files and XML configuration: tips & tricks

In last months I worked so hard with Flex, AIR and files. I’d like to share with you some tips that I think could save your time when you work on it.

 1. Don’t copy, write or do anything else with File.applicationDirectory. In Windows Vista, when you install an AIR application in Program folder, you can’t copy or update a file becuase Microsoft policy don’t allow to work on files in this directory and in all subdirectories.
If you try to make it, it fails silently so stop to execute the code immediately.

2.  You can’t set an <installFolder> different of Program or Application folder. If you try to set a different path like ../ or anything else in AIR configuration xml, when you create .air file, procedure fails with an error.
So you can only set Program folder (Windows) or Application folder (Mac) or a subdirectory like: Applications/myAirAppDir/

3. Attribute <programMenuFolder> is ONLY for Windows.
When you set this attribute you can choose path of Start/Programs menu. It’s optional attribute.

4. Remember to set <name> attribute without special chars.
If you try to make it, or you accidentally copy this attribute in the same XML configuration file, it fails with an error.

5. You can’t install AIR applications in a computer if you don’t have system privileges.

I hope that those suggestions could help in your daily development.

Published by

lucamezzalira

I’m the VP of Architecture at DAZN with more than 15 years of experience, a Google Developer Expert on Web Technologies and the London Javascript community Manager I had the chance to work on cutting-edge projects for mobile, desktop, web, TVs, set top boxes and embedded devices. I am currently managing DAZN, a sports video platform based on the cloud with millions of users that are watching live and on-demand contents. I'm the author of Front-End Reactive Architectures published by APress: https://goo.gl/ywAmsx I think the best way to use any programming language is mastering their models, that’s why I spent a lot of time studying and researching on topics like OOP, Functional and Reactive programming. In my spare time, I wrote for national and international technical magazines and editors, I'm also a technical reviewer for APress, Packt Publishing, Pragmatic Bookshelf and O'Reilly. I was speaker at: O'Reilly media webinars, O'Reilly Software Architecture (San Francisco & London), O'Reilly Fluent (San Jose), O'Reilly Oscon (London), Google Developers Summit (Krakow), Google DevFest (London), Frontend Devs Love (Amsterdam), Voxxed Days (Belgrad & Bristol), JeffConf (Milan), International Javascript Conference (Munich & London), JS Poland (Warsaw), Code Europe (Wroclaw), JSDay (Verona), CybercomDev (Łódź), Jazoon Conference (Bern), JDays (Göteborg), Codemotion (Milan), FullStack Conference (London), React London UG (London), Scrum Gathering (Prague), Agile Cymru (Cardiff), Scotch on the rocks (Edinburgh & London), 360Max (San Francisco), PyCon (Florence), Lean Kanban Conference (London), Adobe Creative Suite CS 5.5 - Launch event (Milan), Mobile World Congress (Barcelona)

2 thoughts on “Working with AIR, files and XML configuration: tips & tricks”

  1. hi luca,

    are you going to share your presentation files afterwards? I’m not able to make it to sotr, too bad 😦

    I’m finishing a mobile guide for sotr as well. I’ll let you know when its finished! 🙂

    grtz Thomas

Leave a Reply to daniel.sedlacek Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s