Today, everyone is linking to a provocative article from The Register with the headline Apple handcuffs ‘open’ web apps on iPhone home screen. There are three separate issues, all of which cause Web applications that are launched from the home screen to work more poorly than they do if you run them in Safari. The biggest issue is that Applications run from the home screen are not making use of the new JavaScript interpreter in iOS 4.3.
A friend who’s a software developer boils down that issue as follows:
- Nitro is a JIT engine and requires that an executable using it be able to mark data memory pages as executable. Safari is a system app so it gets to do that (there’s a signed entitlement in the app that allows this).
- Third-party apps using UIWebView (e.g. PhoneGap apps) do not get that capability so they do not get Nitro and I wouldn’t expect them to, since permitting marking data as executable makes app store review kind of pointless.
- Web apps running from home screen but not in full-screen mode (which launch inside Safari) run Nitro fine.
- Web apps running from home screen in full-screen mode launch inside Web.app, which is a system app and in theory should be able to run Nitro but it’s not because it lacks the entitlement.
Sounds like a bug to me.
For the discussion behind those points, see this thread at Hacker News.
March 17, 2011 at 11:57 pm
It’s clear that The Register website is flaming about this pretending make clear that Android is better that iOS. I agree with you, it must be a bug, that surely will be fixed soon by Apple.
March 18, 2011 at 7:44 am
I don’t consider this a ‘bug’. Apple deployed a new JS engine for mobile Safari, but has not (yet) done so for UIWebView. Building a platform that is mostly free of malware takes time and engineering effort. An equally valid explanation is that Apple simply is making sure this is done correctly.
As a side note, this entire episode from sensationalized story on The Register to the blogosphere reaction shows how few individuals actually understand hardware/software engineering.
March 18, 2011 at 10:53 am
“since permitting marking data as executable makes app store review kind of pointless”
You’re going to have to explain that one to me. The review checks for many things, but can’t exhaustively check to see if you found a hole in their security.
The bigger issue that seems to be getting lost in the noise is that lots of the other hot new features, such as HTML5 offline caching, are simply not available to full-screen web apps running outside of Safari. This isn’t a performance issue: it’s a “stuff just plain doesn’t work” issue. The obvious way to make a webpage-that-acts-like-an-app when a user adds it to their home screen doesn’t work, even though it seems to from within Safari.
March 18, 2011 at 1:22 pm
Marking data as executable makes app store review pointless because app store review includes scanning the executable with various tools to make sure you’re not calling private APIs as well as checking (obviously, it can’t be completely exhaustive, but there’s checks) the app is not doing anything nefarious.
If the app can download arbitrary native code from the intertubes into data memory, mark it as executable, and run it, what’s the point?
March 18, 2011 at 2:04 pm
And, @Steve, by the way, I agree entirely that the HTML Application Cache issue is a much bigger deal. For web apps to be a suitable alternative to native apps, more speed is a nice-to-have; offline operation is a must-have.