0

I am trying to turn an app into a framework so I can distribute it publicly. I want to keep all my logic private yet just expose the API so people can use them easily.

This is easy if you simply use objective-c or swift code, but I use a lot of javascript files which I call using JavascriptCore. I don't want these JS files to be public either.

Is there a way to keep these private as well?

Vlad
  • 8,038
  • 14
  • 60
  • 92
  • "This is easy if you simply use objective-c or swift code." Reverse engineering Objective-C is not hard and is done all the time. And Swift isn't that much harder because of extensive bridging to Objective-C. If you don't want your code to be public, do not ship it to people. If you ship code or data to people, they can reverse engineer it. If it were possible to stop this, then jailbreaking would be impossible. For links to various other threads on this topic, see http://stackoverflow.com/questions/9181186/secure-https-encryption-for-iphone-app-to-webpage – Rob Napier Jun 20 '16 at 02:30
  • If the logic is very sensitive, then you must keep it on your server. If you distribute it, it will be reverse engineered (if it is of any value). If it's just "well, I wish people wouldn't" and you're willing to take on some cost and hassle, you can try one of the various JavaScript obfuscators (http://stackoverflow.com/questions/194397/how-can-i-obfuscate-protect-javascript). Or port the JavaScript to Swift. But there's no way to make it actually "private." – Rob Napier Jun 20 '16 at 02:32

0 Answers0