To update an AIR app, you can use Updater#update() method. This method
accepts 2 parameters - first is 'airFile' and the second is 'version
string'. I am totally confused about the version parameter though -
why do we need it? This is an example from the docs:
var airFile:File = File.applicationStore.resolvePath("Example
Application.air");
var version:String = "2.01";
updater.update(airFile, version);
How can I possibly know that I want to update to 2.01 and not 2.02 or
2.03? Of course I don't - therefore, it's suggested that you first
download the AIR app, extract the version info from the second record
in the AIR/ZIP file (!!!!) and than call the update() method with the
parsed version string.
Why oh why I need to do this? How does it make my application more
resistant to downgrades (which is the official explanation for the
presence of the version parameter)? Of course it's good to express an
intent to upgrade only but then, you would need some other system,
probably increasing integers or something, definitely not a completely
custom version string (which is good for the install screen, for the
"About" dialog etc.)
I feel this is completely wrong in AIR. Am I missing something?
Borek