4 ms·
A simple way to answer that question is – is the only roadblock to building a custom browser in iOS that Apple will reject it during the review process? Or are
by paxys 4y ago
A simple way to answer that question is – is the only roadblock to building a custom browser in iOS that Apple will reject it during the review process? Or are there some fundamental missing APIs or piece of functionality in the platform itself? The latter gap will not be fixed even if you are able to bypass the App Store.
- userbinator 4y agoOr are there some fundamental missing APIs or piece of functionality in the platform itself? All you need is a framebuffer, network access, and some form of user input to produce a usable web browser, and they are all there in iOS.
- paxys 4y agoSo theoretically you should be able to grab an .ipa package with a native browser today and load it on your device in developer mode or through your enterprise program. The fact that not a single one actually exists seems more due to a technological limitation than the fact that no one has bothered to build it yet.
- roywiggins 4y agoPeople have ported Gecko to IOS before. https://twitter.com/TedMielczarek/status/1176864567118483457 https://twitter.com/TedMielczarek/status/1176864567118483457
- madeofpalk 4y ago...and flagging pages of memory as executable to get JIT (or suffer slow JS speed), which is currently blocked by iOS sandboxing.
- easton 4y agoCurrent browser research suggests you don’t need JIT, as evidenced by the ability to disable it on iOS. Wonder how close you could get to “great” performance with a Firefox port without JIT.
- varenc 4y agoIn my experience, disabling the JIT on iOS (via Lockdown mode) results in slow performance and greatly increased battery drain on JS heavy websites and web views. The battery drain being the worst part. But of course with a site like HN there’s no noticeable difference.
- MBCook 4y agoIf Google were allowed to publish Chrome, not based on Safari, but without a JIT tomorrow I think they’d get review bombed by normal users complaining about how it suddenly got slower than the current WebKit implementation. It’s mostly developers who care about the engine, end users are going to care far more about the performance.
- varenc 4y agoThis is the big one that I think people don’t fully appreciate! Without using JIT (just-in-time compilation), your browser’s JavaScript will be terribly slow. But allowing JIT compilation (allowing an app to mark memory pages as executable, i.e. turn data into machine code) will also allow an app to introduce arbitrary new behavior after the app review and make it much easier for it to break out of the iOS sandbox. Stuff like calling private iOS APIs or security sensitivity APIs using machine code downloaded from an external source that an app reviewer will have no way of foreseeing. This isn’t possible otherwise. Even if the app/browser with JIT permissions isn’t malicious, it still opens up way more attack surface area. (Of course Safari already has the same risk) That said, I of course really want more genuine browser options on iOS. But there are real security reasons for Apple’s reluctance, though I’m sure this can solved. But alternative browsers come with different security concerns that don’t apply to just allowing app side-loading (since even now side-loaded apps can’t implement JIT compilation)
- MBCook 4y ago> Of course Safari already has the same risk Which is the reason the JIT runs in its own sandbox connected through IPC IIRC. Breaking the JIT isn’t supposed to even get you access to the parent process (Safari), let alone anything more, assuming you don’t have a kernel exploit too.
- scarface74 4y ago> Of course Safari already has the same risk Apple is perfectly well aware of this and in “lockdown mode”, Apple disabled JIT for Safari.
- varenc 4y agoAgreed! I didn't mean for my comment to imply otherwise. (even Apple's refusal to allow other browsers, which would require JIT to be performant, illustrates Apple is aware the risk)
- madeofpalk 4y agoAnd there's ways forward - iOS already has a "web-browser" entitlement. Apple could use it, or a similar one, to give approved applications access to JIT. I think it would be fine for just a select few developers (Firefox, Chrome) to get ability to JIT. https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_web-browser https://developer.apple.com/documentation/bundleresources/en...
- giantrobot 4y agoYou also need a JIT entitlement for the application. Otherwise your browser engine will only be able to interpret JavaScript instead of JIT compiling it. Good luck getting any modern JavaScript framework running with only interpretation available.
- userbinator 4y agoGood luck getting any modern JavaScript framework running with only interpretation available. They'll work, just more slowly --- and if that encourages less abuse of JS, maybe that's a good thing.
- giantrobot 4y agoSome JavaScript frameworks will work, others will randomly break with timeouts and other weird failures. While we'd hope we'd get less JavaScript abuse all that would happen is no one would use that browser.
- Shekelphile 4y agothere is no roadblock to it besides no developers being interested in doing it, you can sideload anything you want (though you are limited to an absurd degree unless you pay apple $100/yr for a developer license), you can even do things like enable JIT for sideloaded apps so even that limitation doesn't exist for sideloading browsers. several emulators, like dolphin, already have working JITs on ios devices.
- MBCook 4y agoVarenc below is right. Side loading only bypasses the App Store, all the iOS security controls are still in effect. That means there is no way to do things current apps can’t. You can’t make a JIT, so no good alternate browsers. You can’t install other apps, so no making your own store. You can’t make background services like a web server that will always run. You can’t make widgets that are more interactive than what exists now. Nor can you get GPS data without or force the microphone on, the user still has to agree. Side loading gets you side loading. You don’t get expanded privileges without exploits. And expect Apple to be working really hard right now at putting stronger enforcement on private APIs and preventing sandbox escape or limiting access if you do.
- EMIRELADERO 4y agoNot so fast. > [...]Furthermore, the gatekeeper shall allow business users and alternative providers of services provided together with, or in support of, core platform services, free of charge, effective interoperability with, and access for the purposes of interoperability to, the same operating system, hardware or software features, regardless of whether those features are part of the operating system, as are available to, or used by, that gatekeeper when providing such services. - Digital Markets Act
- MBCook 4y agoSo you’re right about stores. You have to be able to side load and install new spa from your side loaded store. That seems to be the only restriction being lifted. Nothing in there seems to say any of the other stuff has to be allowed for side loaded apps. As long as Apple doesn’t let App Store apps do it, they don’t appear to have to allow any new functionality outside that necessary to allow working app stores.
- EMIRELADERO 4y agoThe restriction doesn't only apply to third-party apps on Apple's store. It takes into account Apple's own apps too. Are there first-party apps that are allowed the JIT entitlement? If the answer is yes, they're done.