← home

iOS 7 UIWebView, still not great

September 21st 2013

If you are a mobile developer who would like to use web technologies wherever possible, you probably want to find out whether UIWebView in iOS7 finally supports WebGL and includes WebKit Nitro JavaScript engine. I tested exactly that today. The short answer is a disappointing no to both questions.

My iPad 2 Sunspider 1.0.1 test results:

iOS 7iOS 6
Mobile Safari1268.5ms1440.0ms (1)
UIWebView test app6129.0ms5496.8ms (2)
Google Chrome for iOS6174.1ms-

1) http://www.macworld.com/article/2010286/lab-tests-ios-6-and-ios-5-performance-differences.html

2) http://stackoverflow.com/a/18788195

UIWebView test app is a trivial iOS app I wrote. It instantiates one full-screen UIWebView object which loads the Sunspider test page.

My last test confirms that Google has no special privileges. They have no choice but to use the slow UIWebView like any other developers. I bet Google would like to switch to Blink, the WebKit fork that they created some months ago. But it's pretty clear there is no chance to do so as they are forced to follow the current Apple app store rules.

But back to the results. I needed to rely on existing iOS 6 results available in the net as I didn't execute the tests before upgrading. What we can see is that Mobile Safari performance has improved slightly and that UIWebView is still about five times slower than Safari. In fact, the UIWebView performance has somewhat regressed. This means that Nitro JIT JavaScript engine is still definitely not enabled in UIWebView.

I also verified that neither iOS 7 Safari or UIWebView support WebGL. (It's possible to enable WebGL for a UIWebView with Objective C code but an app doing so will not pass the Apple app store approval process.) Knowing IE 11, which will ship as part Windows 8.1, will support WebGL, this leads to the question why Apple is not embracing the latest web standards if even Microsoft is.

Daring Fireball has thought earlier it's because of security problems. At this point in time that for me this argument is harder and harder to understand. On the other hand Android apps can't use WebGL enabled web view either. It's almost like both Apple and Google want to force game developers to choose the initial platform they want to support instead of giving them a possibility to use WebGL and fast JavaScript which would make it easy to support both platforms easily from the start.

It's just business after all?

comments powered by Disqus