Archive for June, 2008

AIR API Tip: Don’t write to File.applicationDirectory

As a number of AIR developers have discovered, it’s hard—but not impossible—to write files in the application’s install directory. That’s the same location given by File.applicationDirectory.

Granted, it’s often a tempting thing to do. For example, many applications include a database or configuration file with some pre-filled data. Once installed, they often want to update that file, say with user-specific data or preferences.

The first problem with this is that it’s not reliable. On some operating systems—Vista, for example—the installation directory is protected by the operating system. Even if AIR lets you write to this location Vista won’t. So if you want to write portable applications, don’t do this.

The second problem with this is that it’s not safe. Any code written into this directory runs with application privilege, which can compromise your application, which can compromise the user’s machine. That’s why Vista protects these directories.

The third problem is that it invalidates your application’s signature. Among other things, that means you won’t have access to the encrypted local store any more.

It’s also unnecessary. A safe and allowable alternative is to write somewhere into the user’s directory. If you still want a starter file, it’s easy to copy one from your install directory to the per-user location. Note that this also avoid problems if there are multiple users on the same machine.

In order to help developers avoid this pattern, AIR will prevent write access to this directory in most cases, and even when the underlying operating system allows it. There are currently ways around this, as it’s advisory—not mandatory. However, the ability to go around this restriction is often misinterpreted as a defect, and we may close this off in a future release. You’ve been warned.

Adobe AIR 1.1 Now Available

Adobe AIR 1.1 is now available. The major focus of this release is localization, both of the AIR installation UI as well as support for localizing AIR applications.

It also contains a new certificate migration feature, which allows you to transition from using a self-sign certificate to a CA-issued certificate. More on this in a later post.

For all the details, see the AIR 1.1 FAQ. Based on your feedback, we’ve tried to do a better job of highlighting the bugs we’ve fixed, too.

Enjoy!

Adobe AIR for IT Administrators

We’ve just gone live with a new site for IT administrators who are deploying AIR in the enterprise. On this page you’ll find links to the reference documentation, white papers, and so on for the enterprise capabilities I’ve been discussing here.

We hope you find it helpful. We’ll be continuing to add to this site over time. More announcements coming soon!

Real, Live Enterprise AIR Applications

Yes, I’m going to continue to pound the AIR-in-the-enterprise drum for a while. Read Write Web has posted a nice article describing some real enterprise AIR applications that are already deployed and in use today.

I personally use the Employee Directory application on a daily basis. Here at Adobe we can also use a combination of Outlook and three different web apps to get access to this same information. Another interesting example of how aggregation of data and applications is changing.

Adobe AIR Enterprise Configuration

As I mentioned in my earlier post on enterprise deployment, Adobe AIR does support some enterprise configuration settings. There are three currently supported configuration items, specific to AIR:

  1. Enable/disable automatic AIR updates. If you’ve deployed AIR in a lock-down environment, you’ll want to disable automatic updates since users won’t be able to install them, anyway.
  2. Enable/disable the installation of AIR applications. If you want to limit users to applications already installed on their machine, you can disallow the installation of any additional AIR applications.
  3. Enable/disable the installation of AIR applications with unknown publishers. You might use this setting if you want to allow users to install applications, but only the less-risky applications that come from known publishers.

All of these options default to enabled. They can be configured in Windows-based enterprises via policy settings managed via Active Directory. For more information, see Administering Adobe AIR.

Blog-based Badge Installs

I didn’t even know that WordPress has plug-ins. Peter Elst, knows, though and built a WordPress AIR badge plugin that lets you create an AIR install badge for your application in a single tag. Now that’s cool.