tkyaji / cordova-plugin-crypt-file

This plugin to encrypt the source files.
Apache License 2.0
179 stars 116 forks source link

it's not working on cordova-android 10.0.0 and above #97

Open kokchyuan opened 2 years ago

CoooWeee commented 2 years ago

I maybe have the same issue. I am using ionic with capacitor. After installing the plug-in the sources files do not get encrypted.

"@ionic-native/core": "^5.36.0", "@capacitor/app": "^1.0.5", "@capacitor/core": "^3.2.5",

LongTimeNoTea commented 2 years ago

i can't make it work either, any updates?

serfermorhc commented 2 years ago

Same, on android 10 its not working.

kokchyuan commented 2 years ago

Can't think any way to make this plugin work on cordova android 10, the hacky way i can think of is to replace the platforms/android/CordovaLib/src/org/apache/cordova/engine folder from cordova android 9.1.0, this will fallback the usage of WebViewAssetLoader and the plugin will able to work. If you guys have any other solution please comment. Thanks

iPMisterX commented 2 years ago

i try replace this code

platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java

    @Override
    public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
        // return this.assetLoader.shouldInterceptRequest(request.getUrl());
        return super.shouldInterceptRequest(view, request);
    }
weareu commented 2 years ago

100 Added Cordova Path Handler web plugin to decrypt web requests. If fall-through to file protocol the original should still work. It does require AndroidX so if you are having android-x support issues due to various versions, especially on 9 template, adding cordova-plugin-androidx-adapter should fix that.