6

Google has given a reason that All apps on iOS have to run in the sandbox environment except for special apps by apple that get to tap into some private APIs.

So Chrome on iOS uses whatever the UIWebView provides plus it might be doing its UI stuff and some external caching to add something extra to it.

But Why does Google need access to Nitro engine that Safari on iOS has access to.

Can't Chrome port the whole webkit engine and V8 for iOS ?

Xamarin 2.0 manages to port mono (.net runtime) on iOS along with every app.

1 Answers1

8

There are two reasons.

  1. Apple wants to review all code that runs on an iOS device in order to ensure the quality of the overall platform. Obviously, in order to review the code, they need to have it. So, Apple requires that all code that is run by your app, needs to be either part of the app or part of the public iOS APIs. You can embed an execution engine in your app, but you cannot execute code downloaded from the web. However, the whole point of an ECMAScript engine in a web browser is to execute arbitrary code from the web.

  2. [Note: I'm not 100% sure about this.] The iOS security model does not allow an app to execute native code from writeable memory. Memory is either writeable or executable (but read-only). However, V8 is a pure compiler, it doesn't have an interpreter. It compiles ECMAScript to native code in memory, then executes it. But the security model prevents this. So, Google would have to first develop an interpreter for V8. But that would be potentially devastating for performance, and would be a substantial development effort.

Xamarin 2.0 manages to port mono (.net runtime) on iOS along with every app.

  1. The code that is executed by the Mono runtime in this case is all part of the app. No code is downloaded from anywhere.

  2. Mono contains an interpreter.

Jörg W Mittag
  • 104,619