Skip to main content

Adobe For iPhone Back Online

This is a long waited debate ended-up with great news for every Flash & ActionScript developer ..
On September 9th, Apple has announced a statement that it has lifted restrictions on its third-party developer guidelines, followed by Adobe in the same day announcing to developers that they can deliver applications for iOS devices, and they will now resume development work on Adobe’s Packager for iPhone.

Well, What would be the odds of that?
Considering how many ActionScript developers compared to Objective C developers, I think it’s clear enough that there is a revolution coming to the AppStore.

Some would say, so what?!
I say it’s simply a huge field for expanding Flash based applications, which means extremely good for business, especially with the multi-touch feature ..
and ..
It increases the potential competition between HTML5 and Flash Platform as well!

Because Apple has adopted HTML5 since it is open standards, unlike Flash which is closed system, in addition to few other reasons stated by Steve Jobs himself on April 2010, which of course what this is all about ..

EncryptedLocalStore and AIR 1.5

I had my older AIR 1.1 application which uses encrypted local store data for saving specific settings per user, today when the AIR runtime gets updated to version 1.5 my application turned to a total mess!
I’m using various classes in my simple application that might cause this issue as far as I thought, like loading CSS on runtime or loading conditional states and components depending on certain parameters retrieved at login ..
I spent a few hours hunting down what actually happened and at last I think I figured it out ..
The new AIR has 3 new features, encrypted local databases, Flash Player 10 capabilities and the new WebKit update, it seems that Adobe somehow has made a change regarding to how the AIR runtime read and write the encrypted local data, and a simple try and catch block of code just revealed the problem ..

The following example assumes that there is encrypted data stored using an older version of the application complied using AIR 1.1, and the application checks for a certain key for loading the perspective CSS file, since the new runtime may not able to read the older version of the encrypted data then it should throw an error, at this point I reset any previous saved data and load a default CSS file in order to bypass this issue when any client update to AIR 1.5

var skinBytes:ByteArray;
var styleEvent:IEventDispatcher;
try {
	skinBytes =  EncryptedLocalStore.getItem("skin");
	if (skinBytes != null) {
		styleEvent= StyleManager.loadStyleDeclarations("css/"+skinBytes.readUTFBytes(skinBytes.length)+".swf");
	} else {
		styleEvent = StyleManager.loadStyleDeclarations("css/black.swf");
} catch(e:Error) {
	styleEvent = StyleManager.loadStyleDeclarations("css/black.swf");

Well, this is not an intelligent solution at all, cause these saved data my be much more complicated and I should not force my user to have it all wiped out just for upgrading the runtime!
Anyway, I’m not sure if my conclusion about the encryption handling change between AIR 1.1 and 1.5, especially that Adobe didn’t mention anything regarding to this particular issue as fas as I know, but I thought that may be this help someone else experiencing the same problem when migrating his application to the new AIR runtime.

Adobe AIR 1.1 for Linux

Yesterday I was trying to install the new beta version of Adobe AIR 1.1 for Linux ..
At first the installation didn’t work for me, it says:

    An error occurred while installing Adobe AIR. Installation may not be allowed by your administrator. Please contact your administrator.

After contacting Adobe Support they thankfully put me on the right track with the following steps:

  1. If you don’t have the Alpha version of AIR runtime, skip to step 4.
  2. Uninstall the Alpha version of AIR runtime:
      $ sudo dpkg -r adobeair-enu
      $ sudo rm -rf $HOME/.adobe/AIR /root/.adobe/AIR /opt/Adobe\ AIR /tmp/FlashTmp*
  3. Uninstall all the AIR applications that were installed using the Alpha release using dpkg, or simply just use click the air package for each and choose Uninstall.
  4. now you can install the Beta version of AIR runtime:
      $ chmod +x adobeair_linux_b1_091508.bin
      $ ./adobeair_linux_b1_091508.bin

Note: if you get the following message:

    The application could not be installed because the AIR file is damaged. Try obtaining a new AIR file from the application author.

That means you did not uninstall all the AIR applications that were installed using the Alpha release.