Speaking as someone who raised concerns about this, I don't think anyone *prefers* file URLs over app schemes, especially given the CORS issues. However, moving from file URLs to app scheme will result in apps losing all of their local data (indexedDB, localStorage, cookies, cache, etc.) due to it being a different origin.
I think this is a major concern for anyone whose apps are already using WKWebView with file URLs, and it definitely has not been highlighted as something that apps would need to (somehow) mitigate. It seems irresponsible for us to release a major version will knowingly cause data loss for all existing apps. Of the 7 or 8 apps that I maintain, it would not be acceptable to any of the customers to lose data, so I would effectively be stuck on Cordova iOS 5.x forever (or until writing a plugin to copy live databases around). It seems like the easiest option is to add support for both file URLs and custom schemes, and allow it via a preference (maybe the existing scheme preference?): - If the preference is not set, use file URL - Update the cordova-app-hello-world template to set the preference for all newly created apps Note: There was an SPI (private API) added to WebKit recently that allows moving localStorage to another origin, but it doesn't handle other types of data, isn't public API, and doesn't exist in any current iOS versions: https://trac.webkit.org/changeset/261038/webkit There might be a possibility to write a 3rd party plugin to migrate data, but I'm not sure that's a path we (as Cordova) should go down ourselves. ~Darryl On Thu, May 21, 2020 at 9:18 AM julio cesar sanchez <jcesarmob...@gmail.com> wrote: > > we should discuss about what's going to happen > with cordova-plugin-wkwebview-engine > > cordova-ios 6 is coming soon and it uses WKWebView, but it uses a custom > scheme to serve the app content instead of serving from file protocol. > some people prefers file over the custom scheme, > but cordova-plugin-wkwebview-engine will not work in cordova-ios 6 because > of some breaking changes introduced. > > So, should we > > a) continue maintaining cordova-plugin-wkwebview-engine and fix it to work > on cordova-ios 6? > b) modify cordova-ios 6 to allow both file and custom scheme and then > sunset cordova-plugin-wkwebview-engine? > c) do nothing and tell people who want to use file protocol to stick with > cordova-ios 5.1.1? > d) other option I didn't think of (please, describe) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org