

iOS 5 finally brings Nitro JavaScript speed to home screen Web apps - shawndumas
http://arstechnica.com/apple/news/2011/06/ios-5-brings-nitro-speed-to-home-screen-web-apps.ars

======
atacrawl
Anyone else notice that the slug in the URL doesn't contain the word
"finally?" I guess the original headline wasn't snarky or sexy enough.

~~~
_pius
What's wrong with adding finally? Sure, it's light editorialization, but it
succinctly adds accurate additional context that someone unfamiliar with the
situation would not otherwise have.

~~~
pohl
Well, if one takes finally to mean "at long last", it would be more
appropriate to use it for something that took a long time to ship, like
Longhorn or a new version of IE. How long did this take?

~~~
slashclee
Approximately three months.

------
voxmatt
Well, there goes the conspiracy theory that Apple was doing this to handicap
web based apps.

~~~
bradleyland
Heh :) I've also noticed that many of these "conspiracies" are based on an
expectation that A) just because Apple hasn't done something right away,
they're never going to do it, and B) if Apple files a patent for something,
they're absolutely going to do it.

See also: Stories regarding Apple disabling camera at concerts, etc.

~~~
tsunamifury
have you considered that Apple files patents defensively i.e. to make sure no
one makes a product which hinders the vision of their ecosystem?

~~~
kenjackson
What you described generally isn't considered defensive use of a patent.

------
ryanisinallofus
I guess it's time for me to start giving Apple the benefit of the doubt a
little more often.

------
rufo
I haven't checked yet, but I'm hoping they've done something with multitasking
and home-screen web apps; right now web apps reload from scratch _every time_
you re-enter them, which makes for a pretty terrible user experience compared
to native.

~~~
ugh
Doesn't seem like it. A web app I tried just reloaded when quitting and
relaunching and it simply crashed when I used gestures to switch apps.

------
sunsu
I was hoping this would also apply to UIWebView in third party apps, but no
suck luck. Would have been a great improvement for apps built with Sencha +
PhoneGap.

~~~
Xuzz
They can't, however, without removing much of the security mechanisms in iOS.
Excepting the possibility that they could move WebKit (and Nitro) to a
separate process, allowing App Store apps to use Nitro would completely
disable their (generally effective) codesigning and W^X protection.

~~~
stephth
Couldn't they sandbox Nitro processes?

~~~
Xuzz
All processes (at least, ones in the App Store) are already sandboxed, as are
Safari and Web.app (although the latter two are sandboxed more heavily than
ones from the App Store, since Apple knows _exactly_ what things they might
want to access). However, since Nitro is run in-process (as is WebKit as a
whole), it can't be _too_ sandboxed, or the app that's using it wouldn't be
able to do a lot of the things that a native app can do.

It's a tradeoff between functionality and security with the sandboxes, and
right now (for native third party apps) Apple has gone with functionality
(address book access, camera access, etc).

~~~
stephth
Interesting, thank you.

So what would be the security implications of allowing Nitro to create code
dynamically within a sandboxed process? AFAIK, only compiled code (ObjC,C,C++)
can call private APIs, and the app review process guards against that; so what
could a Nitro process do that compiled code couldn't?

~~~
sdkmvx
Any (machine) code can call private APIs, so it's simply a matter of
getting/hacking Nitro to generate the correct machine code to do it. I think
that's what they would worry about. Remember Jailbreakme.com? It was PDF (and
kernel, so no sandbox could have helped) I believe, but a real problem to
consider if you can get custom code running.

------
yuhong
IMO this could have been easily done with an update, since this is based on a
whitelist of processes I think.

~~~
omaranto
Is there actually some difference between an update and a new version other
than number of changes made at once?

