oracle / cordova-plugin-wkwebview-file-xhr

Cordova Plugin for WebView File XHR
Universal Permissive License v1.0
138 stars 118 forks source link

cordova-ios 6 support #55

Closed breautek closed 4 years ago

breautek commented 4 years ago

Hi there,

Cordova has released cordova-ios@6 which implements the WKWebView making their wkwebview plugin obsolete.

But for users who still need to use the file:// scheme, this plugin is still necessary if you need to use XHR to local file:// paths.

I would advise making a minor/patch release that limits version 2.x to cordova-ios@5.x, and a new major release that expects cordova-ios@6 and removes the wkwebview engine plugin dependency.

I think this is necessary to solve https://github.com/apache/cordova-ios/issues/883

manish2788 commented 4 years ago

@breautek Thanks Norman. We are woking on this. We will soon be broadcasting our next course of actions.

ej-dunne commented 4 years ago

@breautek just so you know, I forked this repo and simply removed the wkwebview plugin dependency from the plugin.xml file (line 30) and that seems to have worked. I'm not sure if there will be any other issues due to the small change I made though, so I am still waiting for a new release here, but that got things working with cordova-ios 6.0.0 for now at least

nickredding commented 4 years ago

It seems to me the Cordova iOS 6.0.0 release addresses the file:// issue when loading files from the main bundle but not the cross-origin issue when accessing remote endpoints (this is the second bullet point under "About the cordova-plugin-wkwebview-file-xhr") so this plugin will still be required for apps that need to access arbitrary remote endpoints that are configured to disallow requests from the null origin.

manish2788 commented 4 years ago

We are working on validating certain features of this plugin. We will revert with updates soon.

globules-io commented 4 years ago

https://github.com/globules-io/cordova-plugin-ios-xhr

Sorry Oracle, didn't have time for PR.

ppetree commented 4 years ago

To add to this, if you're using any multi-page framework such as Framework7 or even an old version of JQM, you will need this plugin. With CLI 10 you can't build with this plugin and you're dead in the water without it.

@ej-dunne, yours isn't building with CLI 10 either.

AraHovakimyan commented 4 years ago

@breautek To fix local file access via XHR with WKWebView for Cordova iOS 6.x.x which is accompanied with an error message about "Cross origin requests are only supported for HTTP". You can install just

cordova plugin add https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix

It works fine for me.

jpike88 commented 4 years ago

@manish2788 'validating certain features'... what? It's literally one line in the plugin.xml you remove and voila it works. And now it's mid-Sept, almost 2 months later. Corporate doublespeak nonsense.

manish2788 commented 4 years ago

@jpike88 We have other features as well which requires release. Cordova-ios6 support is one of the feature. We have planned release next week.

manish2788 commented 4 years ago

Latest Plugin Version 3.0.0 takes care of cordova-ios6 support.

ygyg70 commented 4 years ago

I am still getting the same issue with cordova-ios6.1.1 https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix works for me

AraHovakimyan commented 4 years ago

I am still getting the same issue with cordova-ios6.1.1 https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix works for me

Can you explain the issue? The plugin you mentioned "https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix" can't solve your problem or a problem is with Oracle plugin?

ancliffo commented 1 month ago

I am still getting the same issue with cordova-ios6.1.1 https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix works for me

This was the only thing that worked for me, too.