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.
2 thoughts on “Working with AIR, files and XML configuration: tips & tricks”
thanks Luca, I will print this out and hang it on a wall in my office
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! 🙂