Flash on iPhone: Adobe Clears a Hurdle, But More Remain
The Web Dev Zone is brought to you in partnership with JetBrains. Produce high quality code with no additional effort, thanks to state-of-the-art code analysis, on-the-fly error prevention with PhpStorm.
Apple has argued for years that the Flash Player's memory and processing requirements were too high and bad for battery life. Flash-based games and web pages are also notably absent from the iPhone as Apple encourages developers to create web features through open Web standards. At Adobe MAX it was announced that the new Flash CS5 Professional Beta would make it easy to create iPhone-ready Flash apps. Adobe engineers, Aditya Bansod and Adrian Ludwig explain how this is done:
"We created a new compiler front end that allowed LLVM to understand ActionScript 3 and used its existing ARM back end to output native ARM assembly code. We call this Ahead of Time (AOT) compilation -- in contrast to the way Adobe Flash Player and Adobe AIR function on the desktop using Just in Time (JIT) compilation. Since we are able to compile ActionScript to ARM ahead of time, the application gets all the performance benefits that the JIT would offer and the license compliance of not requiring a runtime in the final application," blogs Bansod. Ludwig adds, "There's no runtime interpretation, there's no JIT. These are applications that are built according to all of the rules that have been established in the iPhone developer program."
Adobe's announcement of Flash CS5 Beta is making waves in the iPhone and Flash developer communities. Stefan Richter, founder of Muchosmedia said "We are extremely excited about being able to leverage our existing Flash skills for iPhone development to build rich and engaging multi-user applications." Flash CS5 will be a blessing for Flash app designers, who will soon be able to penetrate the iPhone market with relative ease.
Unfortunately for Flash developers, there are still many things that won't work for a Flash app on the iPhone. Dynamic SWFs, embedded HTML content, RTMPE, PixelBender filters, and microphone/video camera access would not work for Flash on the iPhone. Flash apps also won't be able to access the iPhone's dialer or mapping application. From within an exported Flash app, much of the iPhone API is inaccessable because it must bypass the normal communication route with the iPhone. Here's an initial list of iPhone features that will not work with a Flash app. This limits the class of iPhone Flash apps to mostly games and it has made many iPhone users wonder if the new Flash CS5 will really bring anything they haven't already seen to the Apple app store.
Apple will continue to block the use of Flash Player on the iPhone because of performance limitations. However, Adobe is making progress in Flash Player efficiency. Flash Player 10.1 has improvements in memory consumption, battery use, imput modes, and hardware acceleration support. Its new features will include support for multi-touch, gestures, and screen orientation. As Adobe continues to improve the efficiency of Flash Player, it may become harder for Apple to deny the ubiquitous software access to its holy iPhone.
Adobe is now leading the Open Screen Project which brings together close to 50 mobile industry leaders for the purpose of providing a consistent runtime environment across various mobile devices. The initiative, which does not include Apple, will attempt to solve issues with web browsing and standalone applications on a wide range of devices. The project also aims to remove barriers to publishing content and applications accross multiple "screens".
The Adobe initiative may put pressure on Apple to remove development barriers in the future if consumers want more software variety in their mobile devices. At Adobe MAX, the company's executives created a "myth-busters" parody video intended to be a humorous jab at Apple's ban of Flash on the iPhone. In the video, the actors claim only two devices in the world don't support Flash: an old rotary-dial telephone, and the Apple iPhone.