WKWebview v3.0.0

Added the plugin to my project, working great so far! :slight_smile:

Edit: Crashing after a few mins now :frowning:

What version of ionic are you using?

Cordova CLI: 5.3.3
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.0
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v6.2.0
Xcode version: Xcode 8.2.1 Build version 8C1002

Could you run ionic platform ls? The CLI version looks a little old so you might have an older version of cordova-ios

Gave it a try today… we would love to see this plugin work.

2 issues so far on our side

  • cordova-plugin-image-picker 1.1.1 fails to output images with file://
  • for authentication we use Auth0 with a custom interface and WKWebview breaks the authentication in the inappbrowser (not sure why)

System info:
Cordova CLI: 6.5.0
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.1
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 8.2 Build version 8C38

So file:// not working has always been a case for wkwebview and there’s not really much we can do about that.
What you can do though is to remove the file:// prefix and that should work.

As for the Auth0 issue, we’ll have to look into this more. Could you open an issue on github in the meantime?

thanks… I will run the plugin again tomorrow and gather some more debug info before posting it on github

Hi,

I tested this plugin with the cordova plugin media.

I can build my app, but when I try to install and run it, it crashes with this message in xCode:

Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<WKWebViewConfiguration 0x1701b8640> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _requiresUserActionForMediaPlayback.’
*** First throw call stack:
(0x18358d1b8 0x181fc455c 0x18358ce80 0x183fc18f0 0x100110980 0x1001b0d04 0x1001e4c90 0x1001e4394 0x1001e486c 0x1001e277c 0x1001015e0 0x189442924 0x1894424ec 0x189448c98 0x189446138 0x1894b868c 0x1001e6950 0x1001012fc 0x1894b46a4 0x1896c4a98 0x1896ca808 0x1896df104 0x1896c77ec 0x18516392c 0x185163798 0x185163b40 0x18353ab5c 0x18353a4a4 0x1835380a4 0x1834662b8 0x1894ad7b0 0x1894a8534 0x1001011ec 0x1824495b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

Do you have any idea how I can fix this?

Regards

1 Like

@toufic_zayed could you explain more about this?
What other plugins are you using?
Could you isolate it to a smaller demo?

Hi,

I’ve found what caused the problem: it’s the background plugin in last version 0.7.2.

I reverted to 0.7.1 and it’s ok.

Regards.

2 Likes

On the other hand, the media plugin causes memory leak and my app crash after some time, when playing large file.

It’s not related to wkwebview though, it crashes the same with safari.

I tried to use HTML5 audio, but I encounter CORS issue: most of the mp3 file I try to reach are podcasts on the internet, and most of them doesn’t implement CORS at server level.

Do you know how I can avoid CORS issue with wkwebview? Is there a possibility to embed a local proxy on the app, so that I simulate CORS?

Regards.

Hi Guys,

I get this
: cordova plugin install https://github.com/driftyco/cordova-plugin-wkwebview-engine --save - done!

But no plugin is actually installed

When I try to install with:
cordova plugin add https://github.com/driftyco/cordova-plugin-wkwebview-engine --save - done!

Then I get this version of WKWEBVIEW:
cordova-plugin-wkwebview-engine 1.1.2-dev “Cordova WKWebView Engine”

Here is my info:

Cordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 3.0.0-beta.2
ios-deploy version: 1.9.0
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.2.2
Xcode version: Xcode 8.2.1 Build version 8C1002 

cordova-plugin-calendar 4.5.5 "Calendar"
cordova-plugin-camera 2.3.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.6 "Console"
cordova-plugin-device 1.1.5 "Device"
cordova-plugin-network-information 1.3.2 "Network Information"
cordova-plugin-splashscreen 4.0.2 "Splashscreen"
cordova-plugin-sqlite-2 1.0.4 "SQLitePlugin"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.2-dev "Cordova WKWebView Engine"
ionic-plugin-keyboard 2.2.1 “Keyboard”

Try remove an add platforms and then add plugin. Or remove platforms, add plugin, add platforms. One of those worked for me.

I think that Version 1.1.2-dev is the version “v3.0.0”. In github there is a branch 3.0 containing this version. I also think, that “plugin add” is correct, “plugin install” does not install anything. Confusing…

2 Likes

Thanks guys, I think that Version 1.1.2-dev is the version “v3.0.0” too.

But my version is not triggering Platform Ready then …

I’ve got a infinite spinner loading…

I tried of course to platform remove and add.

After adding in config.xml :

<allow-navigation href="http://localhost:8080/*"/>
<feature name="CDVWKWebViewEngine">
    <param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

All went perfectly !

1 Like

This might be a dumb question… but does this work with ionic package from windows? :grimacing:

1 Like

Hi,

after fixing some plugins because of compatibility issues, my app is very fast on my iPhone 5s. The CPU and memory consumption have improved a lot!

But on an iPhone 5c, it seems that using wkwebview is much slower than safari.

Do you know if there are issues with wkweview on the 5c?

It’s for use with iOS only

@jackvial, sorry I mean the ionic package service https://docs.ionic.io/services/package/ that builds the iOS ipa online.

1 Like