My understanding is that the reason Chrome has to use the iOS webkit view is because that's the only way to get JIT javascript compilation working for apps submitted to the app store. Does anyone have a sense of whether it would be possible to switch to Blink and V8 with a locally compiled and sideloaded version of the app? Would there be any benefit?
zwily|9 years ago
DonHopkins|9 years ago
So WKWebView's dynamically generated code is running safely firewalled in a separate address space controlled by Apple and not accessible to your app, while older UIWebViews run in the address space of your application, and aren't allowed to write to code pages, so their JIT compiler is disabled.
Since it's running in another process, WkWebView's JavaScriptEngine lacks the ability to expose your own Objective C classes to JavaScript so they can be called directly [2], but it does include a less efficient way of adding script message handlers that call back to Objective C code via IPC [3].
[1] https://developer.apple.com/reference/iosurface
[2] https://developer.apple.com/reference/javascriptcore/jsexpor...
[3] https://developer.apple.com/reference/webkit/wkusercontentco...
eslaught|9 years ago
Is that true? I understand the security argument against JITs, but I don't see why it would be objectionable to run a copy of e.g. Gecko if you excluded the JS JIT component. (Of course you would never actually do that. But I'm trying to tease apart the separate arguments and see if they're actually connected.)
It seems to me that the root cause for this is all the JIT. If the JIT in iOS has to be exposed via IPC for security (as claimed in a sibling comment) it's simply not going to be a win to try to use it in combination with a separate rendering engine, if it's even possible at all.
therealmarv|9 years ago
bad_user|9 years ago
On iOS browsers like Chrome and Firefox are basically unable to compete in terms of performance, web standards or features like browser plugins. So people that use them do so just to get sync. Of course Safari Mobile is decent nowadays, but that's not the issue.
oatmealsnap|9 years ago
spikengineer|9 years ago
See section 2.5.6 of the Appstore guidelines
"2.5.6 Apps that browse the web must use the appropriate WebKit framework and WebKit Javascript."
https://developer.apple.com/app-store/review/guidelines/
rweichler|9 years ago
therealmarv|9 years ago
And regarding your quesiton: I'm sure you cannot replace their webkit usage with one switch to Blink... I'm sure the iOS internal webview is deeply integrated/
abrowne|9 years ago
oatmealsnap|9 years ago
madeofpalk|9 years ago
You can't "locally compile" code on iOS. That's against App Store guidelines.
hawski|9 years ago