Monday, October 5, 2009

Adobe Adds iPhone Native App Creation to Flash

Today at Adobe Max 2009, Adobe announced the ability to create native iPhone applications using Flash 5. Now, this really has very little to do with my earlier rants about Flash, because it has nothing to do with Web Development. This is about creating native iPhone apps using ActionScript and Flash tools, which get compiled down to ARM assembly. You can find some more technical information about how they do it here and an FAQ here.

It's an interesting development, and I'm not sure what to think about it. At first glance, it certainly seems like a good move on Adobe's part, as it will make a great marketing point for their dev platform. From a realistic standpoint, though, it doesn't change my opinion that you should avoid hammer development principles and should choose the best tools for each platform. Flash has always been a compromise that takes considerable overhead to let you create applications that can run on multiple platforms while feeling native on none and getting native performance on none.

I also think that using this technology carries significant risks until Apple's position on it is made clear. I've seen no indication that Adobe worked with Apple on it and have seen at least one claim that it was done without Apple's involvement, knowledge, or consent. If that's true, it will be interesting to see how this plays out, but I wouldn't advise even touching the technology until Apple's opinion is known.

There are currently several applications on the App Store created with the private beta version of the Flash iPhone SDK. Out of curiosity, I downloaded several of them to check them out.

First impression: the end-user is unlikely to have any idea how the application was created. There's nothing about these Flash-created applications that screams "Flash". They look like pretty much exactly like any other immersive iPhone applications. That's good.

The next thing I noticed is that none of the applications are particularly advanced or feature things that would tax the hardware or need to leverage the GPU - no 3D rendering, no crazy amounts of animation, no particle generators. They seem to have the equivalent functionality to Flash games from seven or eight years ago though, to be fair, these are early beta experiments, and I probably shouldn't read too much into that. But, these first examples do feel a little sluggish for what they are.

The applications are also bloated for what they are. That Roach Game is nearly ten megs in size for a game that lets you squash roach silhouettes. Red Hood (App Store Link), is twelve megs in size for a point and click game that shows two static images and you have to find the differences. It's little more than an interactive Highlight magazine on the iPhone, with better artwork. The size is an important thing, since apps over ten megs can't be downloaded over wireless connections from the phone and most people buy over wireless. I would bet good money that these applications, rewritten as a native App, would be at least half the size. Which, of course, makes me wonder why there's so much extra code if there isn't an interpreter or JIT compiler in there. But Adobe claims there isn't and that this is compliant with Apple's 'no interpreters or compiler' term of the SDK. I'm not sure I buy that. I'm not sure Apple will either. I suspect there will be a lot of scrutiny applied to the binaries they produce, at very least.

As I dug in further, I noticed that everything gets compiled into the executable. In a typical iPhone application bundle, all the images and sounds files are stored as individual files, separate from the executable, which contains pretty much only the code. If you unzip a Flash-generated .ipa file, you don't see the typical application bundle structure. Other than the splash screen and icon, you don't see any resource files at all, but the executable file is enormous because all the resources are inside of it. This makes me wonder if these Flash-generated apps are memory efficient, which is very important when writing for first and second generation phones. It's not impossible that they could be, but this doesn't seem like the best storage option for an embedded application.

Digging in even more, I noticed that the images in these apps are PNGs, as recommended for iPhone development, but are not byte-order aligned with the iPhone's video memory (GBRA instead of RGBA). So, Flash iPhone apps would appear to get all the disadvantages of the PNG file format, like no lossy compression, without the advantages you get in Xcode-generated iPhone apps (byte alignment to speed up blitting).

The binary executable inside these Flash apps does link to a number of the standard iPhone frameworks, including UIKit (which Flash developers can't access directly according to the FAQ), Audio Queue Services, Core Graphics, and OpenGL ES. Supposedly these Flash apps can leverage hardware acceleration, which the linking seems to support, though the application performance seems to undermine.

Certainly, many Adobe Flash/Flex/Air devs who are scared by Objective-C are celebrating today. I think that celebration should be tempered with a note of caution.

I'm curious to see Apple's reaction to Adobe's back-door insertion of Flash apps into the store before publicly announcing the technology. That was a smart marketing move on Adobe's part - if Apple doesn't yank the apps, it validates Flash as an iPhone dev tool, but if Apple does pull them, they give Adobe assloads of free publicity in the process. Brilliant… in a skeevy sort of way.

Of course, since Adobe doesn't appear to be doing this in partnership with Apple, then it seems unfathomable that Adobe could have accomplished this feat without having violated the iPhone SDK agreement, specifically section 2.5 which prohibits reverse engineering or redistribution of any of the SDK components as well as the creation of any derivative works. Heck, I think you could argue that Flash 5 with iPhone support IS a derivative work under 2.5, and if it's not, there was no way they could have created it without reverse engineering parts of the SDK.

My guess is that Apple won't take kindly to Adobe reverse engineering certain undocumented parts of the SDK. I'm curious if Apple will confront them, and if they do, if it will be directly, or if they'll just do what they did with Palm and make it so Flash-generated iPhone apps stop working. Given how different the application bundles are between an Xcode-generated application and a Flash-generated iPhone application, it would be trivial for Apple to do that, if they wanted to. Heck, it's even possible that these apps will break on future versions of the SDK just because their bundles are different even without Apple doing anything intentional.

If I were a Flash developer, I wouldn't cheer just yet. This looks like a risky proposition to me at present. Adobe and Apple are still acting in an antagonistic fashion toward each other. Adobe could very well have crossed the line here. There are both legal and technical options open to Apple to prevent Adobe from doing this if they choose to. Will they? I honestly don't know. Apple still makes money from apps that are created with Flash tools, so they might just ignore it and take their 30% cut quietly.

But my gut says they are probably not going to do that. If I had to bet, I'd bet that this isn't going to sit well with Apple, and isn't going to play out well for Adobe. I think I would avoid using Flash for creating iPhone apps until and unless Apple gives the process some kind of blessing. Until that happens, it's just darn risky. Your apps could just stop working. They could get yanked. They could act oddly with future releases of the iPhone OS. I'm not saying any of that will happen, just that it's a risk that Adobe's not being up front with Flash developers about.

We do live in interesting times.



36 comments:

Mohammed Al-Asmar said...

Wow, this is a quick response to the whole Flash apps thing, but I can't disagree, the points you mentioned are factual

Sean said...

Yes there are alot of ramifications IF they don't have official support for this strategy, but I think that question needs to be answered first. I've already put a call out on the internal prerelease forums at Adobe and we'll see what they say on the matter.

Although on the same thread someone brought up Unity3D already, it's possible if Apple pitches a fit, Adobe could take the Unity route and go OSX only by having Flash generate an XCode project and force you to package under there.

Niklas said...

So how does Unity work then? It creates massive iphone apps as well. Is a whole different IDE. Haven't use it, but it seems to be a similar thing. Since you program in C# or JavaScript as far as I know.

Jeff LaMarche said...

Sean:

There's a big difference between what Flash is doing and what Unity is doing. Unity generates an Xcode project. Flash, from what I've been told, allows you to compile directly, even from Windows, and push right to the App Store without using any of Apple's dev tools or installing the SDK.

Now, I haven't been able to validate that myself - I don't have access to the private beta, so I'm only going on hearsay, but that doesn't seem to be a big difference between the two, at least in terms of being compliant with section 2.5.

Sean said...

Oh, also I'm skeptical there is an interpreter or JIT inside the compiled executable, but I can guarantee you there's a runtime in there to manage the event loop, play loop and memory management to be consistent with normal flash behavior. That may be the extra weight you saw.

Sean said...

Jeff, that's what I meant. If Apple throws a fit about the way Adobe is doing business, Adobe may choose to go the unity route.

Jeff LaMarche said...

Sean:

That's definitely a safer route, though it's probably n on-trivial for them to make that change.

Keith Peters said...

I agree with just about everything you say Jeff. I love Flash and ActionScript, for creating Flash stuff. I don't see it as the right tool to create iPhone apps. And the Apple response is undefined yet. Should be interesting. Also, having been involved in some Unity projects, there is a very big loss of control in terms of optimization, tweaking things, etc. This is even going to be worse in the Flash->iPhone flow. Brilliant move by Adobe, but I'm not hopping on this bandwagon yet.

K. A. Barber said...

I can't say I am especially happy to hear this news. I can imagine an app store flooded with a plethora of bad/badly written flash games circa 2003/2005.

The Adobe Suite isn't cheap and I would assume this additional capability would make it even more expensive. I am also assuming one would still have to pay the yearly $100.00 developer attunement fee so there will be no savings there either.

As I have expressed before, writing apps native for IPhone isn't hard enough to warrant spending big money on another IDE.

I can see how it is cool thing for adobe as it makes there suite that much more appealing. I don't think I will ever use it but that's just me.

Stuart said...

I wonder how they get around the signing issue? The codesign tool is not available on windows, unless they re-engineered it...

Jeff LaMarche said...

Stuart:

Exactly why I think they must have run afoul of 2.5, one way or the other.

I'm sure there are many discussions going on inside Apple right now that relate to this.

Glenn said...

The first thing that jumped out at me is that these Flash Toolkit apps do not run on the simulator. This certainly implies that they are only supporting arm architecture which shouldn't be the case if they were using standard SDK APIs. I think your direct to binary assumptions are correct Jeff. Great article.

openid said...

The 10MB limit is for App Store downloads over a 3G connection. There are no limits on download size over wireless.

Jeff LaMarche said...

3G is not wireless? ;) I said wireless, not WiFi but, yes, I should have been more specific.

Martijn Lafeber said...

Very interesting response, thanks! Flash shouldn't be on my iPhone, its battery drains fast enough without it.

rwenderlich said...

Great post, I also saw the news and was wondering what the response would be from the development community.

Personally I'm not too happy with the news, as I liked having at least a bit of a barrier to entry into the iPhone market by having the prerequisite of learning Objective-C, which some programmers seem to find difficult... not to mention that if this does go ahead, tons of Flash games are just going to be ported to the iPhone, flooding the market.

cukeitup said...

I think you are all missing an important point... whether or not an app is created using Xcode or Flash 5 is unimportant ultimately to Apple. More apps in the app store means more money for Apple.

Whereas, a Flash player running in the Safari browser circumvents the App Store and all that potential rev share.

sserye said...

Not at all,

Apple AppStore business is to attract more developers to the Mac.
Letting Flash applications compile directly to binaries bypassing a Mac is not Apple business.

I also believe this is bad news for existing iPhone developers.

That's my two cents.

Rob said...

I switched to a Mac after 20 years of fighting with PCs and am, on most days, in love with Apple. I used to use Photoshop but now it's a desktop fly-tipper, and the installation of CS4 that Adobe performed on my shiny new iMac was truly shocking. I certainly hope Apple put a stop to any chance of tons of flash falling into the app store.

PhotonStorm said...

You can only compile for iPhone with Flash CS5, a product which is many months away from official release. If Apple haven't sorted themselves out by then with regards to their stance on this then they deserve whatever small influx of apps this creates.

Assuming there is going to be a flood of sub-par content just because of CS5 is naive at best. The barrier to entry is still massive and expensive. At the end of the day Apple are the ones who approve the apps - and if they say it's good enough to go onto the AppStore, who are you to say otherwise?

Steve Howard said...

Just wondering. Is an influx of 'sub par' Flash games seriously going to dilutet he quality of the App Store? I mean seriously - pull my finger ...

Davo said...

Or is Adobe setting Apple up for a legal fight? 2.5 isn't a constitutional amendment. Flash is a tool for creating an app, you'd be punishing every developer for their choice of development tool - that's like saying you can only use the notepad editor. Apples 'closed' systems are already raising legal eyebrows like Microsoft was in the 90's and it's only a matter of time before the EU acts.

I'd say Adobe is *daring* Apple to act on this. They'll look to get a legal ruling that tears down all the walls and let's the owner of the iPhone decide what does and does not get installed on their own,purchased, hardware.

kimrees said...

The app store is already full of 95% garbage... poorly written and useless apps. The development tools aren't the problem, the developers are. I'm not saying that I think Flash is the right tool for iPhone apps, but I'm just saying that's not the problem with bad apps.

Geoff said...

Apple would be stupid to block any of this. They stand to make a lot of money from the apps and the $100 a pop for each Flash developer who wants to develop for the platform.

I'm also getting weary of hearing that this will somehow lower the quality of the apps in the app store. What Adobe has done is lowered the barrier of entry so a lot of creative people can contribute to this exciting platform. Of course there will be a lot of bad apps, but there are already. There are going to be a lot of very cool apps as well.

Matthew Fabb said...

Well, Adobe has released it's first iPhone application, apparently made with Flash CS5 beta, LiveCycle Workspace Mobile.

Apparently more Adobe iPhone applications made with Flash CS5 are on the way. So if Apple did want to stop them, they will have their chance to do so very publicly with these Adobe iPhone applications.

The public beta for Flash CS5 is said to open up around November/December. So there is some time for Apple to do something about this if they so wished to do so.

The most common reaction I've seen from developers and companies is that this is going to save them time and money. That an application can be done in Flash and can hit all the major mobile platforms, rather than having to make native applications for each platform. Obviously, this likely wouldn't be for taxing complicated applications. However, Adobe is claiming that the new Flash Player 10.1 for mobile is using hardware acceleration and with the optimizations they have made goes up to 87% faster and 40 to 50% less memory than when they were testing with Flash Player 10.0

If anyone is interested, here's an Adobe dev article explaining some more details on how it works.

Plus video of the Adobe MAX session specifically on making iPhone applications with Flash CS5.

Lee Probert said...

Hey. Great post. I'm a Flash/Flex developer and I couldn't agree with you more. In fact I'd written a far less eloquent post on the subject only yesterday. Please have a read here : http://blog.lyraspace.com/2009/10/06/iphlash-application-nightmare-scenario-1/ and thanks for this information. I hope the Flash community steps back for a second to re-think this whole strategy. This could damage the relationship between Adobe and Apple .. which would be very bad.

Lee Probert said...

sorry re-posting the link to my post http://blog.lyraspace.com/2009/10/06/iphlash-application-nightmare-scenario-1/

Rob said...

Try this

Conlan said...

Great post -- flash developers cheered when they heard the news, iPhone developers groaned.

There's already a ton of junk in the store that makes it difficult to find quality apps and flash certainly won't help this.

Let's all cross our fingers and hope this whole Adobe thing fails and blows over >.<

rosy said...

You have a really informative website. pls continue sharing. ;)
Web business model

davidjones035 said...

Hi,

Very nice post. Its good that adobe is understanding the importance of iPhone Application Development and Adds iPhone Native App Creation to Flash. We can hope that all the major development companies can follow this step.

Edwin said...

scrub m65 kamagra attorney lawyer body scrub field jacket lovegra marijuana attorney injury lawyer

jackob said...

I was searching the Internet and found your awesome blog. I have studies many iphone books on the market,If read your this site this is very informative, and your site gives planty of knowledge about iphone.

Thank You
iPhone Developer

antywong said...

The rounded shape of speedy 30 features textile fake louis vuitton lining and leather trimmings with shiny Louis Vuitton Monogram ldylle Romance Encre golden brass. Sized at 11.8" x 8.3" x 6.7", the large capacity Hermes Original Python Birkin 30 Grey of this bag is enough for handbags review daily essentials; you can put bags wholesale everything into this city bag. It also fits for Hermes Clemence Jypsiere 34 Purple every occasion and perfectly goes with any outfits mfakng100910.

Melvin said...

That is an amazing news that adobe has introduced this feature of Flash 5 to create native iPhone applications using Flash. Users can get benefit of this feature to create different iPhone apps. It is good to know about this.


iphone app development

h4ns said...

What youre saying is completely true. I know that everybody must say the same thing, but I just think that you put it in a way that everyone can understand. I also love the images you put in here. They fit so well with what youre trying to say. Im sure youll reach so many people with what youve got to say.

Arsenal vs Huddersfield Town live streaming
Arsenal vs Huddersfield Town live streaming
Wolverhampton Wanderers vs Stoke City Live Streaming
Wolverhampton Wanderers vs Stoke City Live Streaming
Notts County vs Manchester City Live Streaming
Notts County vs Manchester City Live Streaming
Bologna vs AS Roma Live Streaming
Bologna vs AS Roma Live Streaming
Juventus vs Udinese Live Streaming
Juventus vs Udinese Live Streaming
Napoli vs Sampdoria Live Streaming
Napoli vs Sampdoria Live Streaming
Fulham vs Tottenham Hotspur Live Streaming
Fulham vs Tottenham Hotspur Live Streaming
AS Monaco vs Marseille Live Streaming
AS Monaco vs Marseille Live Streaming
Alajuelense vs Perez Zeledon Live Streaming
Alajuelense vs Perez Zeledon Live Streaming
Technology News | News Today | Live Streaming TV Channels