Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>We successful implemented a hack to circumvent this limitation, in a pure AIR way, without having to change the publisher id (which needs multiple certificates, I think).</p> <p>As you know, AIR is implementing its Mutex by using a unique application identifier. This identifier is calculated using the application id, and the publisher identifier (extracted from the certificate that signed the application).</p> <p>In the installation directory of an AIR application, there is a META-INF folder (or in /share/ using Linux). This META-INF folder contains an AIR folder, which contains an "application.xml" file. This file contains a <code>&lt;id /&gt;</code> tag that defines the application identifier, which is used in the calculation of the mutex identifier. If your application can write in the installation folder, you can use the <code>File</code> API to edit it at runtime, randomly changing the <code>&lt;id /&gt;</code> tag, allowing multiple processes of the same application to be run at the same time.</p> <p>This is having some annoying side effects, like creating a new folder in the <code>File.applicationStorageDirectory</code> folder every time. But using a <code>LocalConnection</code>, you can minimize this by reusing the same identifier multiple times by logging which ones are free to be reused. Also, <code>SharedObject</code> are stored in this folder, so cannot be used (or have to be copied every time a new instance is created, and synchronized though <code>LocalConnection</code>).</p> <p>As far as I know, Adobe isn't planning to remove this native limitation. It was implemented for multi-platforming purposes, specifically on MacOS, where the dock is making that more complicated (it's not very easy to start the same application twice with the dock).</p> <p>The official way to do that is to catch the <code>InvokeEvent.INVOKE</code> event, and do stuff like opening a new window. And there's no change planned for AIR 2.0 in this behaviour.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload