4 ms·
Technically I think you are free to build have other browser engines on iOS. However, JIT or other dynamically compiled code is not allowed because that's a sec
by sebazzz 7y ago
Technically I think you are free to build have other browser engines on iOS. However, JIT or other dynamically compiled code is not allowed because that's a security risk. You can't have a browser in 2019 with interpreted javascript.
- fauigerzigerk 7y agoBut why is JavaScript JIT compilation tied to the rendering engine?
- andrewl-hn 7y agoYep. technically, Apple doesn't force Firefox to use WebKit. They could still use their Gecko WebRenderer and use Apple's JavaScriptCore to run page scripts. Same goes to Chrome: Blink + JSC instead of Blink + V8. In practice in seems like both Chrome and Firefox have their renderers and JavaScript runtimes so tightly integrated that it's very hard to replace the later.
- fauigerzigerk 7y agoElsewhere in this debate sharpneli says that there is no public API to call into JavaScriptCore and using non-public APIs violates the App Store rules. So that would explain it.
- saagarjha 7y agoThere is API to use JavaScriptCore in your apps: https://developer.apple.com/documentation/javascriptcore https://developer.apple.com/documentation/javascriptcore. No JIT, though, so it’s slow.
- thekingofh 7y agoI think you mean that you can have interpreted javascript, just not JIT compilers. They don't allow you to mark memory as executable. That syscall is completely disabled on their systems.
- vbezhenar 7y agoIt can't be disabled because Safari and Webkit uses JIT for JavaScript. Probably it's enabled for apps signed by Apple.
- thekingofh 7y agoTrue it is disabled if you aren't Apple.
- saagarjha 7y agoIt is not, moprotect (and mach_vm_protect) work just fine if you have the appropriate entitlements or have a way of getting around its checks.
- thekingofh 7y agoI think the entitlements are not offered to apps such as firefox and those that are not Apple correct?
- saagarjha 7y agoSome of them are, but they cannot be used with apps delivered on the App Store.
- MaxBarraclough 7y ago> I think you are free to build have other browser engines on iOS I believe this is false, see 2.5.6 and 4.7 of https://developer.apple.com/app-store/review/guidelines/ https://developer.apple.com/app-store/review/guidelines/ But they do allow Opera Mini, a 'browser' for iOS where rendering is done in the cloud.