I have created cordova app (ios)that calls a web page via inappbrowser. But due to the decrease in speed in ios, i googled and found about WKWebView. I have installed all the plugins for WkWebview, but I want to know how to call a web page using that? In Inappbrowser i used this for calling the webpage,
var url = 'http://google.com';
var target = '_blank';
var options = "location=no,closebuttoncaption=exit,toolbar=no";
var ref = cordova.InAppBrowser.open(url, target, options);
ref.addEventListener('loadstart', loadstartCallback);
ref.addEventListener('loadstop', loadstopCallback);
ref.addEventListener('loadloaderror', loaderrorCallback);
ref.addEventListener('exit', exitCallback);
function loadstartCallback(event) {
console.log('Loading started: ' + event.url)
}
function loadstopCallback(event) {
console.log('Loading finished: ' + event.url)
}
function loaderrorCallback(error) {
console.log('Loading error: ' + error.message)
}
function exitCallback() {
console.log('Browser is closed...')
}
Similarly I want to know is there a way to call the web page via wkwebview?
UPDATE
I've fixed the remaining known issues with my fork of the Cordova InAppBrowser plugin, which I've rewritten to use WKWebView instead of UIWebView (as the original InappBrowser plugin does), and published it as cordova-plugin-inappbrowser-wkwebview
so:
cordova plugin add cordova-plugin-inappbrowser-wkwebview