-
Notifications
You must be signed in to change notification settings - Fork 991
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
Support serving local content with WKURLSchemeHandler #415
Comments
One challenge is that WKURLSchemeHandler is only available on iOS 11 and up, and Cordova currently supports as far back as iOS 9. |
That is indeed an annoying compatibility quirk, but Apple's data shows that 85% of devices are already on iOS 11+. So I think for some apps it will be acceptable to only support iOS 11+ with WKURLSchemeHandler. Also Apple have officially stated that UIWebView is deprecated now and so more apps will be needing to migrate to WKWebView and running in to this exact problem. |
We are aware of that, @dpogue just stated one of the challenges an implementation of this will have. Do you have further input how exactly such an implementation could look like for |
Currently at Mobile-Spot we plan on using :
Today we are able to build an app for iOS 10 that uses WK webview, and this app handles the custom url scheme only if it is available in the API of the running device:
The downside is that we have to manually edit We also have to include UI webview / WK webview switch on startup which seems more difficult. |
iOS 9 is going away in next major release. |
WKURLSchemeHandler raised a lot of crash in our apps ( not cordova ). |
Ref: https://bugs.webkit.org/show_bug.cgi?id=154916#c17
Cordova apps tend to serve local content. On iOS with WKWebView, this causes severe issues with many features, such as the complete inability to XMLHttpRequest or fetch local files due to strict security restrictions. Apps can resort to
cordova-plugin-file
, but this forces them to write different code to handle iOS, defeating the purpose of Cordova to allow the same code to run everywhere.According to an Apple engineer, apps ought to be using WKURLSchemeHandler instead: https://developer.apple.com/documentation/webkit/wkurlschemehandler
Please consider officially supporting this in Cordova on iOS.
The text was updated successfully, but these errors were encountered: