1

I have a Phonegap iOS application in which I am using Angular Kendo mobile framework for build UI.

I want to use WKWebView in my application instead of UIWebView.
So what all steps I need to follow to do so?

I tried to integrate it by adding the WKWebView plugin but in my application I see blank page only and in logs errors for loading html pages.

User7723337
  • 11,025
  • 23
  • 85
  • 147

1 Answers1

1

You have to install the plugin like this:

cordova plugin add cordova-plugin-wkwebview

And after that in your config.xml add this:

    <plugin name="cordova-plugin-wkwebview" />
    <feature name="CDVWKWebViewEngine">
        <param name="ios-package" value="CDVWKWebViewEngine" />
    </feature>

    <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
Daniel Dudas
  • 2,875
  • 3
  • 23
  • 39
  • Thanks, I have tried the first step as you have mentioned by installing the plugin but i have not did the config.xml related changes. I fee because of that I am not able to see any page in my app, will try this solution. – User7723337 Apr 26 '16 at 04:09
  • The feature tag has been deprecated as of March 7 2016 - http://phonegap.com/blog/2016/02/24/phonegap-build-confg-xml-now-required-and-other-updates/. How should we use the CDWKWebViewEngine within iOS app build with PhoneGap Build? – Laurence C May 27 '16 at 10:22
  • @LaurenceC It might work without specifying the `` tag at all in PhoneGap Build. Did you tried without `` ? – Daniel Dudas May 27 '16 at 13:55
  • @DanielDudas I found out eventually that no matter what I did I couldn't get a PG Build iOS app to compile using cli 6.0.0 or above no matter what I did - I previously got an app building with cli-6.0.0 so I'm not sure what happened here. Are you able to get the view engine working using only: in your config.xml file? – Laurence C May 27 '16 at 14:14
  • @LaurenceC I am not using Phonegap Build for iOS build, I create the build from xcode. Also I use an older version. (5.2.0) – Daniel Dudas May 31 '16 at 09:03