WKWebView is now native in Ionic 2?

Dear all,

I’m new to Ionic 2 development.

I’d like to ask if the Ionic 2 is now natively use WKWebView?
I install with the latest version (2.1.18)

When I load an blank project with:
$ ionic start IonicProject blank --v2

And I add this code to the MyApp constructor() function in app.component.ts:
if (window.indexedDB) {
console.log(“I’m in WKWebView!”);
} else {
console.log(“I’m in UIWebView”);

It will show “I’m in WKWebView!” in the XCode output window!


Best Regards,
Vincent Tam

If you were still wondering, no… in iOs 10, there is an updated webview that has indexedDB by default.
So checking for indexedDB is no longer a valid check to check if you’re running UI or WK webview.