Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Desktop Package Shows Code

When I package a desktop application using Titanium it doesn't encode the javascript files therefore anyone that knows how to view package contents can see and crack my code.

Is there anyway to prevent this? Please advice.


— asked September 28th 2010 by David Mamber
  • desktop
  • package

1 Answer

  • I kind of doubt you can really do this with Titanium, being as the JavaScript gets executed at run time. However, you may be able to obfuscate your javascript files to at least not make it easily readable (just google javascript obfuscation). Of course, if you have the knowledge and time you could always create your own Titanium component with your proprietary logic in the native device language so that it would get compiled in, though that is a lot of work just to hide code. Even with the native part if you make it for Android it will compile to Java which is fairly easy to decompile.

    Really all you can do is make it harder and not worthwhile for someone to look at your code. So if you are really concerned you may just obfuscate your source files.

    EDIT: Sorry, I was thinking you were meaning mobile…..but some of the above probably still applies.

    — answered September 28th 2010 by Mike Robinson
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.