tkyaji / cordova-plugin-crypt-file

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

Encrypted code showing on iOS #80

Open Davegb opened 5 years ago

Davegb commented 5 years ago

My app is working on Android without issues. It doesn't have cordova-plugin-ionic-webview, I removed it to be able to use this plugin, I guess on iOS it should be using UIWebView now. However, it's still showing the encrypted code instead of the actual app when running on iPhone. I also changed for and didn't work either.

I tested on iPhone 4S (iOS 9) and iPhone 6 (iOS 12).

Has someone made it work on iOS?

torinnguyen commented 1 year ago

This issue can be fixed in 2 different ways:

  1. Exclude index.html from encryption. Refer to another issue here. Tested working myself.

  2. There's another hack-ish solution by preventing CDVWebViewEngine.m from reloading when coming back from background. Refer to my screenshot below for code snippet. I did this in a shell script in my CI/CD pipeline because this can't really be done with normal Cordova hooks.

CDVWebViewEngine hacking