Git Product home page Git Product logo

Comments (6)

danzel avatar danzel commented on July 18, 2024 4

Did this get added to the main codebase somewhere? I don't see it in the branches or a PR.

We should probably keep this open until this functionality exists in ManifoldCordova?

from manifoldcordova.

danzel avatar danzel commented on July 18, 2024 1

I've implemented it over here:
https://github.com/danzel/ManifoldCordova
Feel free to take my changes and integrate them, I've broken usage without it though, that probably wants fixing, I just wasn't sure how to make it work nice, and I don't need it for my use.

Notes on the changes:
.h/.m changes:
Mostly just using the WKWebView classes instead of UIWebView ones.
There is a small hack at https://github.com/danzel/ManifoldCordova/blob/master/src/ios/CDVHostedWebApp.m#L254 that I'm not totally sure how best to resolve.

We bundle the wkwebview js part in at https://github.com/danzel/ManifoldCordova/blob/master/src/ios/CDVHostedWebApp.m#L463, it is required for communicating with native. There is a related change in https://github.com/danzel/ManifoldCordova/blob/master/www/hostedapp-bridge.js#L1-L3 to boot it up before we try use cordova. Without this you will get errors about gap://ready in the (web)console. (This cost me a lot of time! So I'm glad to share the reason here.)

from manifoldcordova.

pauloya avatar pauloya commented on July 18, 2024

Thanks for this, we needed something like this as WKWebView is the way to go.
I don't think the hack you mention matters much, because I don't think the method UIWebView:stringByEvaluatingJavaScriptFromString was synchronous anyway, they just added a callback to the WKWebView method, which is probably not needed for this plugin.

from manifoldcordova.

boyofgreen avatar boyofgreen commented on July 18, 2024

thanks @pauloya

from manifoldcordova.

NekR avatar NekR commented on July 18, 2024

Yeah, would be good to know what's going on here with it.

from manifoldcordova.

pauloya avatar pauloya commented on July 18, 2024

I wonder if anyone has made this work with both UIWebView and WKWebView? I just realized forcing the WKWebView forces a minimum support for iOS 9.

from manifoldcordova.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.