Closed twang333 closed 8 years ago
Without details I'm not sure what to do with this. If I had extra time I'd do some digging but I don't have it right now. If you have information on errors you're seeing, what platform, etc. it will give me some place to start.
Until then closing.
I'd like to +1 this request.
Starting with cordova 6 (I believe), Cordova has allowed the developer to switch out the rendering engine on ios. It can be switched from UIWebView to WKWebView.
WKWebView uses a much faster javascript engine, and has some other benefits, but has a different API. It's not a show-stopper that this plugin doesn't work with WKWebView, but having to fallback to UIWebView is making the whole application sluggish (it's a pretty javascript heavy application).
Currently this application does nothing when used with a WKWebView. I'm assuming it needs some changes to either use Cordova's "renderer independent" API, or it needs to be custom coded for WKWebView support.
@Klathmon, thanks for the info. Reopening.
So I decided to take a crack at it. First time ever working with objective-c, and I managed to get something together for our internal usage.
I kind of went "scorched earth" on this and removed literally everything except for the bare minimum I needed, so this ONLY injects the cordova.js and plugin files into any remote app, and it ONLY works with WKWebView. The fork is located here.
It shouldn't be that tough at all to support both WKWebView and UIWebView at the same time. In case anyone else wants to pickup where I left off, I'm going to dump a few links I found useful.
webView
property to either WKWebView or UIWebView depending on what you need.cordova-plugin-keyboard
has figured it out, but it's a bit above my skill level in objective-c for now...You just made my day, awesome work. I'm trying to block off a little time to get to this.
Like I said, I got it working enough that I'm happy, so don't feel like you need to rush for me!
I believe I have this implemented in the branch issue-8. I have more testing to do but please check it out and see if it addresses your needs or if you run into issues.
This is a passive change and should auto detect the type of web view in use and react accordingly.
That works fantastically! Zero changes needed on my part, and I now have the full functionality with WkWebView.
Thanks a ton for following up on this!
Glad it works for you. I'll get it merged into master and pushed to npm this week.
This has been merged into mainline and is in the 0.4.0 release.
Can you please provide some details? Why is this beneficial, what will it provide you, etc.? Also links to relevant docs would be great.