I found the solution,i can precompile or encrpyt and dencrpyt the js files before spidermonkey execute it
How do you that?Thanks
Just a thought，let me code it as fast as i can
I think this needs to be merged to the cocos2d-x source. (with a property to set encryption to true or not), it’s a feature a lot of us will like to have.
Maybe an other way to prohibit code change: check checksum of js files during application:didFinishLaunchingWithOptions: