I am doing experiments on my cocoa mac application ,found I can dump all header files (.h files) of my application executable file using another class-dump executable available on Github.
I want to know how can I prevent my application from header files dump using any 3rd party executable like class-dump.
Command for Dumping:
./class-dump -H /Users/abc/Documents/app -o ./Headerfiles
Any Suggestions
Thanks in Advance
I doubt there's any way to prevent this.
Objective-C class, method, property, protocol, and category information is all registered dynamically at runtime. Therefore, your executable's
__DATAsection must contain all of this information. Tools likeclass-dumpsimply reverse engineer these tables to create an equivalent interface (.h) file.The only way to get around this would be to programmatically create your classes at runtime, which in my opinion would be just crazy.
An ugly, half-solution—full of potential problems—would be to try some form of code obfuscation:
would appear in the compiled application as