Flex 4.6 AIR アプリケーションで作業しています。クリックするとボタンが表示されます。サーバーからアプリケーションの新しいバージョンをダウンロードし、システムに AdobeAIRInstaller バージョン 3.8 が既にインストールされている場合 (Windows と MAC の両方)、自動的にインストールします。
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());
}
なぜこれがそのように振る舞うか誰か教えてください。