App crashing .. 11 Ios with WKWebView


#1

Hi all ! I Could anyone suggest please … I have latest Ionic, install WKWebView, but have problem with build … app dose not running …

cli packages: (/usr/local/lib/node_modules)


    @ionic/cli-utils  : 1.12.0

    ionic (Ionic CLI) : 3.12.0


global packages:


    cordova (Cordova CLI) : 7.0.1 


local packages:


    @ionic/app-scripts : 3.0.0

    Cordova Platforms  : ios 4.5.1

    Ionic Framework    : ionic-angular 3.7.1


System:


    Node  : v6.11.4

    npm   : 3.10.10 

    OS    : macOS Sierra

    Xcode : Xcode 9.0 Build version 9A235 


Misc:


    backend : pro

2017-10-06 10:08:11.447052+0300 MyApp[359:187720] *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<WKWebViewConfiguration 0x1c01f4400> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _requiresUserActionForMediaPlayback.’

*** First throw call stack:


#2

What WKWebView are you using?


#3

Sujan12,good day ! I run ionic cordova plugin add cordova-plugin-ionic-webview --save.


#4

You might want to create an issue here then: https://github.com/ionic-team/cordova-plugin-ionic-webview/issues


#5

Does your config.xml contains the following as described in the README of the plugin?

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

<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

#6

reedrichards, no …


#7

well then maybe you should begin there, give a try :wink:

for references, see README required permissions


#8

reedrichards, thanks a lot.


#9

Unfortunately, adding to config.xml dose not help …

2017-10-09 13:30:41.499515+0300 MyApp[543:363986] CDVWKWebViewEngine: trying to inject XHR polyfill

2017-10-09 13:30:41.891373+0300 MyApp[543:363986] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<WKWebViewConfiguration 0x1c01fc200> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _requiresUserActionForMediaPlayback.'

*** First throw call stack:

(0x1814e3d38 0x1809f8528 0x1814e3a00 0x181def780 0x101034b80 0x10116763c 0x101192fb0 0x1011926f8 0x101192b8c 0x1011902c0 0x101032428 0x18a8f3bfc 0x18a8f37d4 0x18a8fa39c 0x18a8f7608 0x18a967068 0x101194cc8 0x101032144 0x18a963050 0x18ab56898 0x18ab5b6e4 0x18ade9454 0x18b0b91f0 0x18ade90b8 0x18ade9928 0x18b5526e8 0x18b55258c 0x18b2ce9c0 0x18b463fc8 0x18b2ce870 0x18b0b8850 0x18ab59e28 0x18af5d6ec 0x183b85768 0x183b8e070 0x10164545c 0x101651b74 0x183bb9a04 0x183bb96a8 0x183bb9c44 0x18148c358 0x18148c2d8 0x18148bb60 0x181489738 0x1813aa2d8 0x18323bf84 0x18a957880 0x101032034 0x180ece56c)

libc++abi.dylib: terminating with uncaught exception of type NSException

(lldb)

#10

Do you use cordova-plugin-background-mode ?

Look like there is a conflict there between this plugin and wkwebview


#11

reedrichards, уеs, i use cordova-plugin-background-mode !


#12

well then you know the reason of the problem :wink:

there is hope, @manucorporat offered is help to fix this problem, you should follow the following issue I guess then…of course if you know how to solve it in inside the cordova-plugin-background-mode plugin don’t hesitate to give a hand


#13

reedrichards, thanks, I am useing background-mode 0.7.2 version …


#14

reedrichards, I run $ cordova plugin add https://github.com/katzer/cordova-plugin-background-mode.git , but it dose not help ! How to install latest plugin version ?


#15

I think you did install the last version with the cmd you just run, the thing is, as you could see in the issue #317, the bug is not solved, therefore even if you install differently, the collision between the two plugins with still be there…but that is only my understanding


#16

This works for me. Thank you