New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova + WKWebView + UIWebView w/ pressure #29

Closed
NorthMcCormick opened this Issue Mar 21, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@NorthMcCormick

Looking into more of the cordova web view settings and seeing if there is anything I can find that would stop it, but it just returns the unsupported callback. I'd love to utilize this library in my hybrid app for a few things. Yours is the first library to include a callback like this so I wasn't sure if the other libs weren't working or if I was just crazy haha.

I'll do some digging and report back what I find, if anyone else has an idea of why the cordova web view (iOS 9, uses UIWebView same as safari) wouldn't work definitely chime in.


Please provide information about the device you are seeing the issue on
Device is a iPhone 6S+
Operating system is iOS 9.1
Browser is UIWebView (not sure the versioning...)

@stuyam

This comment has been minimized.

Show comment
Hide comment
@stuyam

stuyam Mar 21, 2016

Owner

Hey @NorthMcCormick cool idea! Unfortunately from what I have noticed is that the UIWebView actually lags in support behind the actual Safari app. From my knowledge the web view does not support force values on touch events. That is why any other apps the use the web view like the chrome app do not support 3D touch.

I am going to double check on this but I am pretty sure that is why. Hopefully Apple will add support soon because that would be a big deal!

Owner

stuyam commented Mar 21, 2016

Hey @NorthMcCormick cool idea! Unfortunately from what I have noticed is that the UIWebView actually lags in support behind the actual Safari app. From my knowledge the web view does not support force values on touch events. That is why any other apps the use the web view like the chrome app do not support 3D touch.

I am going to double check on this but I am pretty sure that is why. Hopefully Apple will add support soon because that would be a big deal!

@NorthMcCormick

This comment has been minimized.

Show comment
Hide comment
@NorthMcCormick

NorthMcCormick Mar 21, 2016

I was afraid of that. I do know that the iOS 4.0+ platform version with cordova is giving us the option for and updated UIWebView as well as WKWebKit. So if we can leave this open, once I am able to get my project updated, I can test this with the WKWebKit. The newest chrome I think is using the new WKWebView as well. I'll double check that and maybe use it as a test bed too.

I was afraid of that. I do know that the iOS 4.0+ platform version with cordova is giving us the option for and updated UIWebView as well as WKWebKit. So if we can leave this open, once I am able to get my project updated, I can test this with the WKWebKit. The newest chrome I think is using the new WKWebView as well. I'll double check that and maybe use it as a test bed too.

@NorthMcCormick

This comment has been minimized.

Show comment
Hide comment
@NorthMcCormick

NorthMcCormick Mar 21, 2016

I just confirmed, as of Chrome 48 (49 is the current production version) on iOS 9 and up pressureJS does work in the browser. So that's good news! Once I get the WKWebView working I can further test to see if it works without any further options.

I just confirmed, as of Chrome 48 (49 is the current production version) on iOS 9 and up pressureJS does work in the browser. So that's good news! Once I get the WKWebView working I can further test to see if it works without any further options.

@stuyam

This comment has been minimized.

Show comment
Hide comment
@stuyam

stuyam Mar 21, 2016

Owner

Oh that is great news! Thanks for doing that research, that is really good to know. So it sounds like it is supported in the WKWebView but not the UIWebView. I would love to know if you switch to the WKWebView if it will work. To be honest I did not know there were two different types of embedable web views on iOS.

Owner

stuyam commented Mar 21, 2016

Oh that is great news! Thanks for doing that research, that is really good to know. So it sounds like it is supported in the WKWebView but not the UIWebView. I would love to know if you switch to the WKWebView if it will work. To be honest I did not know there were two different types of embedable web views on iOS.

@NorthMcCormick

This comment has been minimized.

Show comment
Hide comment
@NorthMcCormick

NorthMcCormick Mar 21, 2016

Yes, there are two, however the WKWebView has been bug-city for the last year or so. Cordova FINALLY has it supported with that 4.0 platform version.

In fact, it's been so buggy that (I'm pretty positive) iOS Safari didn't use WKWebView until iOS9, but it's been in the system since like iOS7, publicly available in iOS8.

Yeah cross my fingers it will work, it should open up some cool doors for hybrid apps.

Yes, there are two, however the WKWebView has been bug-city for the last year or so. Cordova FINALLY has it supported with that 4.0 platform version.

In fact, it's been so buggy that (I'm pretty positive) iOS Safari didn't use WKWebView until iOS9, but it's been in the system since like iOS7, publicly available in iOS8.

Yeah cross my fingers it will work, it should open up some cool doors for hybrid apps.

@yanniks

This comment has been minimized.

Show comment
Hide comment
@yanniks

yanniks Mar 23, 2016

Apple introduced new JavaScript engines with iOS 4.3 . Since then, they were Safari only, 3rd party apps had to use the old classes, known as UIWebKit. Since iOS 8, WKWebKit is available which now offers the same classes Safari uses.

yanniks commented Mar 23, 2016

Apple introduced new JavaScript engines with iOS 4.3 . Since then, they were Safari only, 3rd party apps had to use the old classes, known as UIWebKit. Since iOS 8, WKWebKit is available which now offers the same classes Safari uses.

@stuyam

This comment has been minimized.

Show comment
Hide comment
@stuyam

stuyam Mar 26, 2016

Owner

Thanks everyone for the input on this. I made two small iOS apps to test in the simulator, one running the UIWebView and one running the WKWebView. As we suspected pressure and 3D touch WORK in WKWebView but NOT in UIWebView. So if anyone is looking to use pressure (or any 3D touch in general) in an iOS web view use WKWebView and not UIWebView.

WKWebView
UIWebView

Owner

stuyam commented Mar 26, 2016

Thanks everyone for the input on this. I made two small iOS apps to test in the simulator, one running the UIWebView and one running the WKWebView. As we suspected pressure and 3D touch WORK in WKWebView but NOT in UIWebView. So if anyone is looking to use pressure (or any 3D touch in general) in an iOS web view use WKWebView and not UIWebView.

WKWebView
UIWebView

@stuyam stuyam changed the title from Doesn't work in Cordova to Cordova & WKWebView & UIWebView w/ pressure Mar 26, 2016

@stuyam stuyam changed the title from Cordova & WKWebView & UIWebView w/ pressure to Cordova + WKWebView + UIWebView w/ pressure Mar 26, 2016

@stuyam stuyam closed this Sep 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment