Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
9  
Because Apple's afraid of competition and won't allow any scripting languages not controlled by them in their Walled Garden. It's not a technical problem. –  Mason Wheeler May 16 '13 at 12:48
    
So basically the app will be rejected ? –  Amogh Talpallikar May 16 '13 at 13:35
    
You'd have to ask Apple that. But it's their garden; they can do whatever they want, so long as they're not breaking any laws. –  Robert Harvey May 16 '13 at 14:35
2  
My understanding is that Xamarin actually compiles to native code practicably indistinguishable from code compiled from objective C without a .NET runtime. What you see in the studio is some mono-friendly wrappers. This is why there are things one should not do in monotouch that one can do in .NET such as runtime reflection. Also, that is Miguel de Icaza and he can pull off stuff other mortals can't. –  Wyatt Barnett May 16 '13 at 15:05

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
1  
Just one note: Mono doesn't interpret or JIT the CIL bytecode on the iOS device. It is ahead-of-time compiled into machine code as part of the build process. –  Weeble Sep 18 '13 at 18:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.