WKWebview v3.0.0

Thank you for your suggestions. The new wkwebview works well. However in my case, I have to remove ios platform as well as the cordova webserver plugin folder before add the platform back for it to install and run properly.

I can also confirm that removing “file://” prefix work! :slight_smile:

One issue I get with WKWebView (which doesn’t happen with UIWebView) is that a scrollbar appears randomly (I think) on pages with scroll-content. This happens like 50% or so of the time, so sometimes the scrollbar appears and sometimes not.

However, if I connect the device to a computer and use the Safari inspector and remove “-webkit-overflow-scrolling: touch;” from class “scroll-content”, the scrollbar goes away. Of course the scrolling experience is horrible then though.

Anyone have the same issue and know what causes it or what could be done to fix it?

Thanks!

Hi,
I have added the plugin using below command in the command line.
ionic plugin install https://github.com/driftyco/cordova-plugin-wkwebview-engine --save
After adding this plugin, When I try to build using XCode its throwing lot of errors like
-> CDVWebViewDelegate.h is missing.
-> Register plugin is in not available in CDVViewController.
-> InitwithView:settings: is not available in CDVLocalStorage class.
etc etc…

Please suggest the solution.
Thanks
Logendran.

Most everything seems to be going smoothly for me except that I can’t seem to use canvas.toDataURL, which I need for some dynamic image creation. Is this not supported yet? Thanks!

Two thumbs up for this plugin! :thumbsup: :thumbsup:

I had recently upgraded from Ionic 2.x to 3.x, and WKWebview was crashing my app!

I was able to resolve by upgrading all of my other native plugins to their respective 3.0 versions. Hopefully this will help someone else :smiley:

Hi,

I have the same issue, Im using a third party services as well and it doesnt support CORS request.

I saw that the team is working in this issue and hopefully this will solve it but I havent seen any updates lately.

re: add options to disable local web server, implement local proxy to handle server no cors support #115

1 Like

@mhartington I’m a little confused about the status of this plugin? Can we use it in production? And I’ve seen some announcements that WKWebview will be the default in Ionic shortly (tweet from Max on April 3). Can you clarify if and how we can use WKWebview in our Ionic 3 apps.

I’m using Ionic 3.2.1 and Ionic CLI 3.0.0

I’ve been successful using WKWebview in ionic 3.2.1 following the instructions in the git readme. My app uses firebase/angularfire/ionic deploy/stripe/onesignal and everything seems to be working fine!

@maith123 Thanks for the input. I’m using firebase/angularfire/ionic as well. It seems to be working, but I’m still not sure whether I should use it in a production app. I’m wondering why it hasn’t been added to ionic2-app-base yet.

A post was split to a new topic: WKWebView: slight delay in tapping items

I’m getting an error trying to install this.
Any suggestions would be appreciated.
This is my system info and the error header:


global packages:

    @ionic/cli-utils : 1.2.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.2.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.2.1
    @ionic/cli-plugin-ionic-angular : 1.2.0
    Cordova Platforms               : android 6.2.3 ios 4.4.0
    Ionic Framework                 : ionic-angular 3.1.1

System:

    Node       : v6.9.4
    OS         : macOS Sierra
    Xcode      : not installed
    ios-deploy : 1.9.0
    ios-sim    : not installed
[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova plugin add https://github.com/driftyco/cordova-plugin-wkwebview-engine.g... (exit code 1):

        Error: Failed to fetch plugin https://github.com/driftyco/cordova-plugin-wkwebview-engine.git via registry.
        Probably this is either a connection problem, or plugin spec is incorrect.
        Check your connection and plugin name/version/URL.

Did you try to install https://github.com/driftyco/cordova-plugin-wkwebview-engine.git with .git at the end?
Maybe that’s the cause. Remove .git at the end and try it once more:

ionic cordova plugin install https://github.com/driftyco/cordova-plugin-wkwebview-engine --save
1 Like

That was it. Thanks!

1 Like

actually, there is some problem. when using wkwebview the media plugin do not create media object in background-mode. either used with cordova background-mode plugin or not still wont work.
I’m not sure if this is media plugin issue or the wkwebview issue.

4 posts were split to a new topic: HTTP get and post API with rxjs not working if i use CDVWKWebViewEngine for IOS App

Does this version support custom schemas.
Related issue for this cordova plugin.

1 Like

Hi,
When I update to latest version I am getting following error on Simulator.

{"code":"ResourceNotFound","message":"/Users/shashwat/Library/Developer/CoreSimulator/Devices/B0643839-BA5C-4CD4-A6C7-B404AACF5E5F/data/Containers/Bundle/Application/37DC9839-F513-4840-B153-8504EE1DADCA/WeatherSpork.app/www/index.html does not exist"}

But it works on real device. :frowning: Please help

Config.xml

<engine name="ios" spec="~4.4.0" />
    <plugin name="cc.fovea.cordova.purchase" spec="^6.1.2" />
    <plugin name="com.gosyntactix.cordova.testflightdetector" spec="git+https://github.com/Arcticus/Cordova-Plugin---Test-Flight-Detector.git" />
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-geolocation" spec="^2.4.3">
        <variable name="GEOLOCATION_USAGE_DESCRIPTION" value="Need geolocation to track sun and moon position." />
    </plugin>
    <plugin name="cordova-plugin-google-analytics" spec="^1.8.3" />
    <plugin name="cordova-plugin-network-information" spec="^1.3.3" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
    <plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
    <plugin name="cordova-plugin-wkwebview-engine" spec="git+https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" />
    <plugin name="cordova-plugin-x-socialsharing" spec="^5.2.0" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />

Even basic Hello World cordova app failing on simulator:

It doesn’t work for me neither in simulator or real device.
See timeout error in xcode when trying to load the index.html and the hangs on splash screen. Also tried with new empty app based on tabs template. Same effect… Any ideas?

Can someone from Ionic/Drifty please tell us if this can/should be used ?