I checked the subErrorID, which reports 16827, " The version contained in the 
update file does not match the version from the update descriptor." 

I assume "update file" here is the update.xml file I placed on my server (in 
the same directory as the Air application file). 

I assume the "update description" mentioned is the Flash Builder auto-generated 
Air Application Descriptor file (with name myappname-app.xml placed in the 
bin-debug directory). 

The producer I use is, first I clean the project, then I edit the version 
number in the application descriptor file, then I export the project, and move 
it's .air file along with update.xml to my server. 

In both places I have: 


< versionNumber > 12 </ versionNumber > 




I can verify update.xml on the server by visiting it in a browser. 




Now I'm wondering if this versionNumber should be located somewhere else? 




Is update.xml supposed to be included in the project directory somewhere? 
Currently I've just been creating it outside Flash Builder, then moving it 
along with the final .air file to my website for download. 




Any idea what else I can check? 


----- Original Message -----

From: "Felipe R. Sebastiani Sobenes" <[email protected]> 
To: [email protected], [email protected] 
Sent: Saturday, July 4, 2015 11:25:11 PM 
Subject: Re: problem getting current version number using 
ApplicationUpdaterUI() 

Hi 

I hope this function will help. This function is adapted to the new version 

// Find the current version for our Label below 
private function setApplicationVersion():void { 
var app_updater:ApplicationUpdaterUI = new 
ApplicationUpdaterUI(); 
var version_actual:String = app_updater.currentVersion; 
trace("Current version is "+version_actual); 
} 

2015-07-04 21:34 GMT-05:00 <[email protected]>: 

> Is there any reason why the following code would return different values 
> running in Flash Builder debugger compared to when installed as an 
> application on the computer? 
> 
> 
> 
> var appXML:XML = NativeApplication.nativeApplication.applicationDescriptor; 
> 
> var ns:Namespace = appXML. namespace (); 
> 
> The debugger sees the right version number, but the installed app looks 
> like (I'm guessing) it's getting some default, initialized, value (?) 
> 
> ----- Original Message ----- 
> 
> From: [email protected] 
> To: "apache users" <[email protected]> 
> Sent: Saturday, July 4, 2015 7:06:04 PM 
> Subject: problem getting current version number using 
> ApplicationUpdaterUI() 
> 
> I'm struggling to get ApplicationUpdaterUI() working with Flex 4.12 using 
> Flash Builder 4.7 and Air 3.1. 
> 
> I'm getting a Download Failed error (e.g. There was an error downloading 
> the update. Error# 16824) when the updater attempts to download the new 
> version. 
> 
> I'm trying to follow the directions here: 
> 
> http://www.adobe.com/devnet/air/articles/air_update_framework.html 
> 
> as well as here: 
> 
> 
> http://help.adobe.com/en_US/air/build/WS96E10DFB-39A5-4488-A666-15B9B46C5EE8.html
>  
> 
> 
> My code is at the bottom of this post. 
> 
> One interesting issue I see is that the label text in lblAppVersion.text 
> always reports version 0.0.0. Note that I did update the xml code on the 
> server to use "versionNumber" instead of "version", as well as the AS3 code 
> here: 
> 
> lblAppVersion.text = "App version: " + appXML.ns::versionNumber; 
> 
> but the current version shown in the app as well as the updater UI window 
> displays 0.0.0 instead of, say, 1 or 2 etc. (I've tried so many times). 
> 
> Interestingly, when I run the app in the FB debugger the version number is 
> correct; it's only when I download the app from the internet and install it 
> on my Mac, then run it, does it always show 0.0.0. 
> 
> Anyone know what could be causing this (I'm hoping that resolves my error 
> above)? 
> 
> My code... 
> 
> private var appUpdater:ApplicationUpdaterUI = new ApplicationUpdaterUI(); 
> 
> private function checkUpdate():void { 
> setApplicationVersion(); 
> appUpdater.updateURL = "https://www.example.com/aa/update.xml";; 
> appUpdater.delay=1; 
> appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate); 
> appUpdater.addEventListener(ErrorEvent.ERROR, onError); 
> appUpdater.isCheckForUpdateVisible = false; 
> appUpdater.isFileUpdateVisible = false; 
> appUpdater.isInstallUpdateVisible = false; 
> appUpdater.initialize(); 
> } 
> 
> private function onUpdate(event:UpdateEvent):void { 
> appUpdater.checkNow(); 
> } 
> 
> private function onError(event:ErrorEvent):void { 
> Alert.show(event.toString()); 
> } 
> 
> 
> private function setApplicationVersion(): void { 
> var appXML:XML = NativeApplication.nativeApplication.applicationDescriptor; 
> var ns:Namespace = appXML. namespace (); 
> lblAppVersion.text = "App version: " + appXML.ns::versionNumber; 
> } 
> 
> And the update.xml file: 
> 
> <?xml version="1.0" encoding="utf-8"?> 
> <update xmlns="http://ns.adobe.com/air/framework/update/description/2.5";> 
> <versionNumber>10</versionNumber> 
> <url>https://www.example.com/aa/myapp.air</url> 
> <description><![CDATA[ 
> This version has fixes for the following known issues: 
> *First issue 
> *Second issue 
> ]]></description> 
> </update> 
> 
> And I also make sure that my app-app.xml contains the same version number 
> as the update.xml file, before I export the release build and move it and 
> the update.xml files to the server. 
> 
> 
> 
> 


-- 

Saludos Cordiales. 


Felipe R. Sebastiani Sobenes 




Blog: www.frss-soft.com/wordpress 
Twitter: @frss03 <http://twitter.com/#%21/frss03> 


------------------------------ 

Reply via email to