kam800 / MachObfuscator

MachObfuscator is a programming-language-agnostic Mach-O apps obfuscator for Apple platforms.
MIT License
521 stars 78 forks source link

Remove __unsafe_unretained, _Nullable, _Nonnull from header sources #100

Closed kjamroz-bt closed 4 years ago

kjamroz-bt commented 4 years ago

Additional parameter annotations break selector detection in headers (which uses regexes). This was observed for nullable-related attributes: __unsafe_unretained, _Nullable, _Nonnull and other variations and arrays. For example countByEnumeratingWithState:objects:count: was not detected properly.

kjamroz-bt commented 4 years ago

I am currently on Xcode 11.2, but I suspect it was always this way.

I found it by accident: I forgot that I enabled --xx-no-analyse-dependecies and got crash on countByEnumeratingWithState:objects:count: which should have been detected in headers. This particular selector is correctly detected in dylibs but it is a good example for unit tests.