Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Last I read, Apple was limiting javascript performance in UIWebViews compared to what was available in Safari, is this still the case?


No. In iOS 8 apps can use WKWebView, which is accelerated.


Wow, thanks, I can't believe I missed reading about this until now. This framework looks really promising


Unfortunately, due to sandboxing rules added around beta4, WKWebView doesn't allow access to any local files, making it nearly worthless for hybrid apps, ebook viewers, etc.

The only workaround that I know of is to run a webserver on a background thread and point the WKWebView at it. Hopefully Apple fixes this in a future release.

Also, WKWebView doesn't work with NSURLProtocol, which a lot of companies use to implement encryption and dynamic (e.g. database-sourced) web pages.


My distant but intense interest in the future of hybrid apps just took a nosedive. Do you know if any of the major players (Phonegap, CocoonJS, etc) implement the web server approach? It doesn't seem too difficult, but it sure must be a hassle.


The only reason it wasn't allowed until now was security. With iOS 8 cross process communication improvements, the JITed JavaScript engine can be used by third party apps in a segregated fashion without sacrificing security.


Is this also true when using JavaScriptCore directly? Or do you only get JIT compilation in the context of a web view?


Only in a web view. The point is that the JITed code is in an isolated process with few permissions.


And vitally it can allocate executable memory, which nothing you write can.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: