Is it possible to use WKWebView with Cordova CLI?

0 favourites
  • 4 posts
  • I've been using Cordova CLI to build my apps up until now, but lately I've realised I can seem to get WKWebView working.

    When I tick the option to use WKWebView, then run it in Xcode, I can see that it is still using UIWebView. I've tried adding the WK plugin with Cordova, also the file and http plugins. If I add the WK engine plugin, the app runs in WK mode but all I get is a black screen.

    Is it only possible to use Phonegap at the moment? I've tried to have a look around but I can't find a guide to using WKWebView anywhere apart from the r224 release notes, does anyone know if there's something I could read that would help?

  • You need to make sure you use all the same settings and plugins as is specified in config.xml when exporting for Cordova from C2. Also it only works with CLI 6.0+.

  • Still having problems with this. I'm sure it's my fault though! At the moment this is the process I do:

    • Create cordova project

    • Add iOS platform

    • Add plugins:







    • Build project

    • Run with Xcode, it's always worked fine with uiwebview, but wkwebview always just gives me the black screen.

    I'm using CLI 6.2.0

    Should i take the config.xml file out of the www folder and put it in the main project folder before building? I've tried it both ways.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If the CLI accepts the config.xml produced by C2, you should definitely use it - it specifies several other options like target OS versions and some preferences that might also be necessary. I'm pretty sure PhoneGap Build uses the CLI and that works fine, so it's probably just a matter of getting your CLI to build the same as PhoneGap Build uses it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)