phoboslab/Ejecta — pull request #182 by shauninman (2013-06-02 01:05:14+00:00)
Title: Protecta: An Embedded File System to protect JavaScript source in an Ejecta.ipa

First up, Ejecta is awesome. Second, this is my first Pull Request so I apologize if I'm doing it wrong.

Finally, what's this about? After playing with Ejecta for a few days I tried extracting the .app from the archived .ipa and discovered that my JavaScript source code was human readable in the package contents.

So I wrote a few build scripts and an SIEmbeddedFileSystem singleton to get that stuff into the binary and away from unscrupulous App Store cloners. Non-JavaScript assets in the `/App/` directory (like images and level files) are still copied over during build. Only the JavaScript source is protected.

Is this convoluted? Maybe. Is there a better way to do this? Probably. But I thought I'd put this out there.