HACKER Q&A
📣 axg11

Is there a way to decompile iOS and search variable names?


I'm looking for a way to snoop around the iOS codebase if possible. I assume there's no way to gain access to the source code (legally ;)). Is there a way to decompile iOS with variable names intact and search through this?


  👤 simonblack Accepted Answer ✓
"Would a rose by any other name smell as sweet?"

You can disassemble machine code into some form of source language, but the variables you discover can only be allocated nonsense non-identical names like 'alpha0001', 'alpha0002', 'alpha0003', etc. Very often those names will reflect the address in memory where that variable is stored.

Apart from the fact that a particular variable exists, you can have no idea what its name is. And without lots of hours of reverse-engineering work, you won't know what its purpose is. More or less you can only know where it is stored in memory and what its value is.

Of course, once you have disassembled the code and know what the function of a particular piece of code is for, you are free to rename the variable and code with descriptive names of your own. But the likelihood that your variable name and your code-routine name is the same as the original coder's is pretty negligible.


👤 robthebrew
Very unlikely. Variable names are usually stripped out, and function names often are. In principal it is the same as looking at any binary, after you have extracted the binary from the device.