1

I have a Cordova-based project hosted on the Play Store. How do I make sure the JavaScript files are not seen? I have tried the cordova-plugin-progaurd plugin but even after adding this plugin and building to release mode and zipping the file I clearly can see all the .js files.

Is there any way I can obfuscate these files or even better make the folders not visible?

dda
  • 6,030
  • 2
  • 25
  • 34
user581157
  • 1,327
  • 4
  • 26
  • 64

2 Answers2

1

Using the following plugin you can encrypt HTML, CSS, and javascript files.

https://github.com/tkyaji/cordova-plugin-crypt-file

Note: If you build the app with this plugin you can't debug the app since it encrypts all files. So add this plugin and build the app before uploading to play store.

Naresh Kumar
  • 938
  • 5
  • 12
0

There are some obfuscation tools available for you to conceal your code and the logic behind it.

I personally use Jscrambler (jscrambler.com) as it has not only obfuscation transformations, but also application-locks (to lock your code to a specific domain/ browser/ operative system or time) and self-defending capabilities (add anti-debugging and anti-tampering features to your application).

There is plenty of documentation on https://docs.jscrambler.com/

They have a free trial plan so you can try some of the transformations in your own code.

richie
  • 23
  • 5