Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 1.59 KB

ThingsThatAreNotObfuscated.md

File metadata and controls

27 lines (21 loc) · 1.59 KB

Things that are not obfuscated

There are a couple of language features that are not subject to obfuscation. These features are:

  • local variables
  • closure parameters
  • closure capture list elements
  • associated types
  • type aliases
  • enum constants (raw values)
  • enum case names
  • switch case value bindings
  • generic parameters

None of them is visible in the compiled binary. For example local variables are not included in the symbol table. They are kept on stack or in registers depending on how compiler optimized the code. You may be now wondering - how the debugger know the names of local variables? It uses special debug informations that are included in the compiled binary when it's compiled in "debug mode". In release builds these special debug informations are stripped off.

Similarly associated types, type aliases, enum constants and generic parameters are also not visible in the compiled code.

There are also constructs that can't be obfuscated because that would cause runtime errors. A good example is database related code. That means that obfuscator doesn't rename:

  • variables with @NSManaged attribute
  • subclasses of NSManagedObject

References: