This plugin to encrypt/decrypt the source files.
npm install cordova-plugin-crypto-file

cordova plugin add cordova-plugin-crypto-file
IonicWebViewEngine.java (that is inside the ionic webview plugin) needs to be modified for this plugin to work and for the source code to be encrypted.
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
super.shouldInterceptRequest(view,request);
return localServer.shouldInterceptRequest(request.getUrl());
}
@TargetApi(Build.VERSION_CODES.KITKAT)
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
return localServer.shouldInterceptRequest(Uri.parse(url));
}
`
3. Add this instead:
`
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
return super.shouldInterceptRequest(view, request);
}
`
Then the plugin will work.
Configuration
You can also change the port in the config.xml, but it needs to be the same port as the one used in the "cordova-plugin-ionic-webview".
To change the port, do the following:
#### cryptoPort
`xml
`
Encrypt
cordova build [ios / android]
Decrypt
cordova emulate [ios / android]
or
cordova run [ios / android]
Encryption subjects.
$3
* .html
* .htm
* .js
* .css
$3
You can specify the encryption subjects by editing plugin.xml.
plugins/cordova-plugin-crypt-file/plugin.xml
`
``