Signup for the Ionic Newsletter to get the latest news and updates!

  • Abu Nj

    what about the apk size , will this make app size bigger?

    • Manu Martinez-Almeida

      No, WK is provided by Apple as a shared library. It is not in your app’s bundler.

      • Abu Nj

        so this for iOS only ?

        • ukvemsord

          Yes. On Android you’ll use the built in Chrome webview, starting at Android 5 as far as I can tell.

          • Manu Martinez-Almeida

            Even better: 4.4 and since 5.0 it updates frequently since it is not part of the OS!

  • Seba

    Is this only for IOS???

    • Henrik Merlander

      Yes, only iOS

      • Manu Martinez-Almeida

        but you don’t need it since the webview is already backed by chrome by default in Android

        • Irina Lapina

          Sorry for the off-top, but have you seen this McFly bitcoin?
          I’m talking about this thing:

  • http://www.raymondcamdencom/ Raymond Camden

    So to be clear, “Ionic Apps will run on WKWebView…BY DEFAULT.” This means “they can run with it and you don’t have to change anything”, it does NOT mean that a new Ionic app will use it automatically… right?

    • Todd

      No, from what I can tell, the default engine will be WKWebView. So a new Ionic app will use it automatically. If you don’t want to use WKWebView, you’re going to have to remove the WKWebView plugin.

      • http://www.raymondcamdencom/ Raymond Camden

        That’s not what it says though:

        “In order to add WKWebView, we must add the plugin from the Ionic repository.”

        If the implication is that it is for existing apps, they didn’t make that clear (to me).

        • Todd

          Yeah, the wording there definitely sounds like it is *not* included by default. But if you take a look at the ionic base starter project files config.xml (, it has the plugin as part of the config.

          • http://www.raymondcamdencom/ Raymond Camden

            Ok – so word to the Ionic folks – maybe a small tweak on top?

            Thanks Todd!

  • George Kappel

    Unfortunately WKWebview still has issues with setting focus on an input which is a pretty substantial regression from UIWebView behavior for any apps concerned with facilitating data entry

  • Thiago Vieira

    This change impacts Ionic 1.x apps too?

    • Peter Lærke Lorentzen

      Would love to know this as well as we have some legacy apps now failing.

  • sneas

    For those who suffer from CORS issue, have no control over endpoint and don’t want to use @ionic-native/http cause it makes development process in browser impossible I published this plugin

    • Rako Nda ᵀᴴᴱ ᴼᴿᴵᴳᴵᴻᴬᴸ

      Is this plugin help to track Http request when using the native Http?

      • sneas

        Unfortunately, native Http requests are not displayed in Network tab of developer tools. You have to take care of it yourself by outputting requests and results into console. Perhaps with HttpInterceptor.

    • ghenry22

      @sneas I wanted to say thanks for this! Just implemented in my app, not for cors issues in my case but to allow my app to work with self signed certificates which has been a major ongoing headache!

  • Anton

    Hi all ! I have latest Ionic, install WKWebView, but have problem with build .. app dose not running ..

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

    *** First throw call stack:

  • radzik

    Finally. The UIWebView’s performance is just not acceptable…

  • Vincent

    To anyone planning on using it as a replacement for UIWebView, please mind this issue:

    “[wkWebView] wkWebView disables JS execution when app is backgrounded”

    • ghenry22

      I have submitted a few PR’s to the ionic-wkwebview which resolve this issue to allow full background processing as expected.

  • Jane Dawson

    What does this mean to users, who currently use crosswalk in their apps? Does this replace crosswalk?

  • Remi Sture

    Will this plugin work to migrate local storage to WKWebView?

  • Martin Bech

    This is great. However the no JS while app is in background, is a pretty big problem for background notifications etc. Will this be fixed?

    • Vincent

      [just for the follow-up, I think Martin is referring to this:

    • Irina Lapina

      Do you want to fly a car? You can order you first free flight here:

    • ghenry22

      I have submitted some PR’s to the ionic-wkwebview project which resolve the background processing issues.

  • Danny

    Does anyone know how to solve this CORS issue I faced ?
    I’m trying to load an image on the html canvas in my Ionic app from Amazon s3
    let source = new Image();
    source.crossOrigin = “Anonymous”;
    source.src = s3Img (An image from S3);

    then I got this error.
    Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
    Failed to load resource: Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
    Cross-origin image load denied by Cross-Origin Resource Sharing policy.
    I also set my S3 bucket CORS configuration like this.


    Does anyone know what I am doing wrong?

    Thanks a lot in advance.

  • Eric

    Don’t you think there’s a potential security issue telling API distributors to whitelist `localhost:8080`? That exposes the service to every developer running their own web server. Of course, API keys should be in place but I know this will never fly at my job, even though if we whitelisted `localhost:8080` and used API keys we wouldn’t even need to setup CORS.

    Wouldn’t it make more sense to proxy WKWebView so it sends requests with source set to `ionic` or something?

    I also share the same concerns others do about this plugin in that it disables JS execution when it goes into the background.

    • ghenry22
      this should let you work around cors issues by falling back to using native HTTP library transparently.

  • Andrew Martin

    I hope some ionic central resource has been chucked at the http plugin, the XHR/CORS stuff in the new webview makes this a major blocker as the network plugin is just not up to scratch (and we can’t set CORS headers on every server we need access to)… if you try anything reasonably out of the ordinary involving cookies, xml or content-types it does not play well. I’ve tried various http plugins including the official one and the one that uses the standard angular http provider with native http code backend, nothing works.

  • SopheaMen Van

    I installed WKWebView but it does not work with javascript map. Anyone face this problem?

  • Fra

    It’s not working with Videogular2 plugin, does not play using WKWebView

  • cm

    If you use WebSQL, you should also set the minimum deployment target to iOS 10.0, because in iOS 9 or lower, WKWebView doesn’t support WebSQL.

    Also note that IndexedDB is apparently not 100% stable (at least PouchDB doesn’t support IndexedDB on iOS) and WebSQL is deprecated. Nothing to worry about today, but keep this in mind for future iOS versions.

  • Alberto

    I’ve been stucked with this error {“_body”:{“isTrusted”:true},”status”:0,”ok”:false,”statusText”:””,”headers”:{},”type”:3,”url”:null} since I’ve noticed that with WKWebView the client does an OPTION method call before the POST.
    So please, take into account that with CORS WKWebView should be allowed to do OPTION call to the server!!

    • yesimahuman

      Hey, that’s how CORS works. It first does an OPTIONS request to see if the current origin you’re on is allowed. Currently we use localhost:8080 so you’d need to enable that on the server. We are looking into changing the origin given feedback.

      • Alberto

        Yes That’s right! Ionic users should check deeply all the method permissions into the server. I think should be good if you remember it in the article 🙂 Thank you guys for your great work!!!!

  • Dennis Butovetsky

    When I try to upgrade to WKWebView and get error when starting the app in iOS simulator: “Failed to load webpage with error: The request timed out”.

    I followed the troubleshooting guide here without any success:

    Anyone else experienced similar issue?

  • Michael Wagstaff

    Will the file:// issue be handled better eventually in the future? The current solution seems cumbersome, especially for apps creating and displaying a lot of local files. Just curious if it’s worth holding out for an improvement here?

    • ghenry22

      the file:// issues is caused by Apple, unless they allow the webview to access local storage locations directly it will never be “resolved”. The solution in the current ionic-wkwebview is pretty much transparent. I just added the plugin and all files that I had stored in the persistent storage are accessible and work as expected.

      It may seem clunky to have a local webserver running just for this but the server in use is super small and seems very well optimized. Would be nice not to need it but the issue has been present since iOS 8 so I doubt the situation will change any time soon.

  • Cyril

    I’m working with Ionic v1…

    I replaced “cordova-plugin-wkwebview-engine” with “cordova-plugin-ionic-webview”.

    Now, when my app is starting, I can see a log “Using UIWebView” and it looks like UIWebView is really in use.

    Is this plugin usable with Ionic v1?

  • Carlos Maurício Machado

    I reall don´t want to use this plugin cordova-plugin-ionic-webview , the apps that I´m developing, need to comunicate with the file system. i tried to remove to use the right way, but i can´t change.. I need some orientation to use the old way

  • Christian Martin

    Be aware of running in you app ionic app in livereload mode. Then you will have a completely different origin. (use to check your origin

  • Paul Patarinski
  • Mohammed Abdul Kadhir

    popup is not working in webview