Much ado has been made about the inclusion of Apple’s new web view (WKWebView) in iOS 8. PhoneGap/Cordova developers especially were keen to take advantage of this new high-performing web view in their apps. In this article we’ll discuss why WKWebView is important and how you can use it today with Telerik AppBuilder.
In the context of hybrid apps, the biggest takeaway regarding WKWebView is that it includes Nitro, which brings us to…
The other advantage of leveraging WKWebView is a decrease in memory and CPU usage on the device. Our tests have shown a 50% to 80% decrease in both memory consumption and CPU usage. Your individual results may vary of course, but this looks very promising!
For a more detailed analysis of the WKWebView and what it means for hybrid developers, check out TJ VanToll’s post on the Telerik Developer Network.
Leveraging WKWebView in Telerik AppBuilder couldn’t be much simpler thanks to the Verified Plugins Marketplace. If you haven’t heard of the Verified Plugins Marketplace until now, it’s a curated set of high value Cordova/PhoneGap plugins that have been thoroughly tested, documented, and verified to work with AppBuilder. And, yes, the WKWebView plugin is available now in the marketplace!
Tip: Make sure you are targeting Cordova 3.7+ in AppBuilder, this will make sure your build uses the latest iOS SDK.
To use the WKWebView plugin in your AppBuilder app you have two choices:
On the plugin detail page, click the Try Plugin in AppBuilder button. This will clone our WKWebView demo app in AppBuilder for you, so you can get up and running immediately.
If you have an existing AppBuilder app, the easiest way to include a Cordova plugin is by using our Package Manager:
Alternatively, you may use the AppBuilder CLI or Cordova CLI by issuing the following commands:
appbuilder plugin add "WKWebView Polyfill" --release
cordova plugin add https://github.com/Telerik-Verified-Plugins/WKWebView
Hopefully once you see the potential benefits of using WKWebView, you’ll be eager to test it on your app. Try out the WKWebView Cordova plugin on the Verified Plugins Marketplace and notify us of any issues. Good luck!
Header image courtesy of Dan DeChiaro