Results 1 to 4 of 4

Thread: JavaScript source code protection?

  1. #1
    Sencha Premium User Iveco's Avatar
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    105
    Answers
    2

    Default Answered: JavaScript source code protection?

    Is it possible to somehow obfuscate the JS-source code of the native app?
    AFAIK apk's sourcecode (for example) can be easily made visible.
    Will that be possible too when I use a PhoneGap/Cordova native build?
    Or is it even possible to use 3rd party libraries like www.jscrambler.com to protect my source-code?

    Thanks!

    Regards from Germany
    German EXT-User and -Lover :-).

  2. http://docs.phonegap.com/en/4.0.0/gu..._index.md.html

    Here it is more clarified. It is easily possible to currently read the Source-Code of Sencha Touch + Cordova Applications.

    So just 2 solutions:
    1. Officially Sencha gives "Sencha Space", which includes souce-code protection, so thats why I guess here is no official answer for doing it yourself, since they have a product ready to buy for this case.
    2. Use different JavaScript libraries (YUICompressor, JSScrambler,...) which obfuscate your code even more. Since it's JavaScript and has to be read to be executed, of course source-code can never be encrypted (Security through obfuscation / obscurity).

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    My understanding is that the code is still available. You can obfuscate the code and deter some folks, but ultimately if JavaScript is being run, it is available in some form. I suppose if your application is only privately available, that would provide some measure of code security.

  4. #3
    Sencha Premium User Iveco's Avatar
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    105
    Answers
    2

    Default

    Yes definitely I think JavaScript will be visible, but SenchaCMD does a good job of minimizing it already, so it's hard to read. Moreover I think it is possible to run external 3rd party libraries like JSScrambler and then build a native package with it, from an even more obfuscated source-code. Nonetheless you have just to try it out. Will do that in at a later stage. Thanks!
    German EXT-User and -Lover :-).

  5. #4
    Sencha Premium User Iveco's Avatar
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    105
    Answers
    2

    Default

    http://docs.phonegap.com/en/4.0.0/gu..._index.md.html

    Here it is more clarified. It is easily possible to currently read the Source-Code of Sencha Touch + Cordova Applications.

    So just 2 solutions:
    1. Officially Sencha gives "Sencha Space", which includes souce-code protection, so thats why I guess here is no official answer for doing it yourself, since they have a product ready to buy for this case.
    2. Use different JavaScript libraries (YUICompressor, JSScrambler,...) which obfuscate your code even more. Since it's JavaScript and has to be read to be executed, of course source-code can never be encrypted (Security through obfuscation / obscurity).
    German EXT-User and -Lover :-).

Similar Threads

  1. Spam Protection
    By mitchellsimoens in forum Community Discussion
    Replies: 4
    Last Post: 23 Feb 2013, 12:51 PM
  2. Replies: 1
    Last Post: 1 Nov 2012, 2:33 PM
  3. Replies: 1
    Last Post: 6 Apr 2011, 3:44 PM
  4. touchsolitaire source code
    By fgeorge in forum Sencha Touch 1.x: Examples and Showcases
    Replies: 0
    Last Post: 22 Dec 2010, 10:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •