2013-10-18 53 views
3

我正在使用Flex 4.6 AIR應用程序。當我點擊它時,會出現一個按鈕,它會在服務器上下載新版本的應用程序,並在我的系統中安裝AdobeAIRInstaller版本3.8(Windows和MAC)時自動安裝它。AIR應用程序不使用ApplicationUpdaterUI更新

當我將Adobe AIR版本從3.8更新到3.9時。安裝過程在Windows PC中正常工作,但在Mac中,當我單擊更新時,它從服務器下載應用程序,但未自動安裝。

我的代碼的XML文件是

<?xml version="1.0" encoding="utf-8"?> 
<update xmlns="http://ns.adobe.com/air/framework/update/description/2.5"> 
    <versionNumber>1.2.9</versionNumber> 
    <url>File Path URL</url> 
    <description><![CDATA[ 
1. Test swf file secure. 
    ]]></description> 
</update> 

而對於更新的代碼如下

protected function btnUpdate_clickHandler(event:MouseEvent):void 
      { 
       NativeApplication.nativeApplication.addEventListener(Event.EXITING, 
        function(e:Event):void 
        { 
         var opened:Array = NativeApplication.nativeApplication.openedWindows; 
         for (var i:int = 0; i < opened.length; i ++) 
         { 
          opened[i].close(); 
         } 
        }); 

       appUpdater = new ApplicationUpdaterUI(); 
       // Configuration stuff - see update framework docs for more details 
       appUpdater.updateURL = modellocator.appUpdateURL; // Server-side XML file describing update 
       appUpdater.isCheckForUpdateVisible = false; // We won't ask permission to check for an update 
       appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate); // Once initialized, run onUpdate 
       appUpdater.addEventListener(StatusUpdateErrorEvent.UPDATE_ERROR, onStatusUpdateError); 
       appUpdater.addEventListener(StatusUpdateEvent.UPDATE_STATUS, onStatusUpdate); 
       appUpdater.addEventListener(ErrorEvent.ERROR, onError); // If something goes wrong, run onError 
       appUpdater.initialize(); // Initialize the update framework    
      } 

      private function onStatusUpdate(event:StatusUpdateEvent):void 
      { 
       trace("Update Status"); 
      } 

      private function onUpdate(event:UpdateEvent):void 
      { 
       appUpdater.checkNow(); // Go check for an update now 
      } 

      private function onStatusUpdateError(evt:StatusUpdateErrorEvent):void 
      { 
       showAlertMessage(resourceManager.getString('languages','msgInternetNotConnected'), "", "", 286, 142); 
       modellocator.timerClosePop = new Timer(5000); 
       modellocator.timerClosePop.addEventListener(TimerEvent.TIMER, removeErrorMessage); 
       modellocator.timerClosePop.start(); 
      } 

      private function removeErrorMessage(event:TimerEvent):void 
      { 
       PopUpManager.removePopUp(messageAlertPopup); 
       modellocator.timerClosePop.stop(); 
      } 

      private function onError(event:ErrorEvent):void 
      { 
       trace(event.toString()); 
      } 

請誰能告訴我這是爲什麼行爲就這樣。

+0

的ApplicationUpdaterUI()的問題,我認爲這可能是一個已知的問題3.9。請參閱:https://bugbase.adobe.com/index.cfm?event=bug&id=3648402 – Shawn

回答

0

與更新只是在進行的Adobe AIR的最新版本(> = 3.9.0.1210)被固定在Mac OS X