Using WKWebView for your hybrid iOS apps

Since many years UIWebview was used as the container in which the webpart of any Cordova based hybrid project was viewed, increasing in functionality and stability along the years. But it never felt really snappy and had some issues for more complicated projects and the world of GUI frameworks that seems to be in Flux all the time.

Since iOS 8 was introduced back in 2014 Apple decided it was time to implement a new and modern vision on their Webkit API. In the center of this new version is WKWebview, created for iOS 8 & OS X Yosemite and newer versions.

The biggest pro for using WKWebview over the older UIWebview? Speed! Especially for hybrid apps, almost entirely consisting out of logic and view creation in the webbased code layer, seem to thrive on the speed that this renderer brings along.
Besides that, some inconsistencies and memory leaking have become things of the past, making it THE component to use for hybrid apps.

Now, 2015 and iOS 9 rolled out freshly on the 16th of September, there are a couple of options one could follow to embrace the new webviewing component. This post describes some of the most interesting options available as of September 2015.

So with that info in the back of your mind, here are the options you can take on using WKWebView for your hybrid app as of today:

The easiest but most anticipated: Wait for Cordova to implement it as a default
This will give you the most stable and thorough setup for your apps although we have to see if backwards compatibility towards pre-iOS 8 versions will be included

You remember that cool Crosswalk project that makes your hybrid Android project superfast and more OS independent? Guess what, they’ve got an iOS variant using WKWebViewIf that ain’t cool! The people from the Crosswalk crew are working on a sibling solution for iOS too. Quality guaranteed.

Although the first one will probable be the best in a long-term relation it is perfectly understandable that you want your iOS hybrid solution to profit from a speed increase as of today.