# App crashing .. 11 Ios with WKWebView

**URL:** <https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878>\
**Category:** ionic-v3\
**Created:** [October 6, 2017, 7:26am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878 "2017-10-06T07:26:24Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 6, 2017, 7:26am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/1 "2017-10-06T07:26:24Z")

</div>

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

```auto
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:

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 6, 2017, 11:36am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/2 "2017-10-06T11:36:32Z")

</div>

What WKWebView are you using?

---

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 6, 2017, 11:38am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/3 "2017-10-06T11:38:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [October 6, 2017, 11:54am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/4 "2017-10-06T11:54:48Z")

</div>

> [@anton\_klochko](#):
>
> cordova-plugin-ionic-webview

You might want to create an issue here then: [Issues · ionic-team/cordova-plugin-ionic-webview · GitHub](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues)

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [October 6, 2017, 12:14pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/5 "2017-10-06T12:14:57Z")

</div>

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" />
```

---

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 6, 2017, 2:40pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/6 "2017-10-06T14:40:48Z")

</div>

**reedrichards** , no …

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [October 6, 2017, 2:55pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/7 "2017-10-06T14:55:25Z")

</div>

well then maybe you should begin there, give a try 😉

for references, see README `required permissions`

> **[ionic-team/cordova-plugin-ionic-webview](https://github.com/ionic-team/cordova-plugin-ionic-webview)**
>
> Contribute to cordova-plugin-ionic-webview development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 6, 2017, 3:12pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/8 "2017-10-06T15:12:02Z")

</div>

**reedrichards** , thanks a lot.

---

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 9, 2017, 10:40am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/9 "2017-10-09T10:40:33Z")

</div>

Unfortunately, adding to config.xml dose not help …

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [October 9, 2017, 1:06pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/10 "2017-10-09T13:06:38Z")

</div>

Do you use `cordova-plugin-background-mode` ?

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

> <https://github.com/katzer/cordova-plugin-background-mode/issues/307>

> <https://github.com/katzer/cordova-plugin-background-mode/issues/264>

---

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 9, 2017, 1:15pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/11 "2017-10-09T13:15:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [October 9, 2017, 1:36pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/12 "2017-10-09T13:36:00Z")

</div>

well then you know the reason of the problem 😉

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

> <https://github.com/katzer/cordova-plugin-background-mode/issues/317>

---

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 9, 2017, 2:09pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/13 "2017-10-09T14:09:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anton\_klochko](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@anton\_klochko](https://forum.ionicframework.com/u/anton_klochko)\
**Post date:** [October 10, 2017, 9:34am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/14 "2017-10-10T09:34:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [October 10, 2017, 10:02am UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/15 "2017-10-10T10:02:17Z")

</div>

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

> <https://github.com/katzer/cordova-plugin-background-mode/issues/317>

---

<div class="post-metadata">

**Author:** ![BayBoran](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@BayBoran](https://forum.ionicframework.com/u/BayBoran)\
**Post date:** [December 30, 2017, 8:15pm UTC](https://forum.ionicframework.com/t/app-crashing-11-ios-with-wkwebview/107878/16 "2017-12-30T20:15:40Z")

</div>

[This](https://github.com/katzer/cordova-plugin-background-mode/issues/307) works for me. Thank you
