• In iOS development, how does our code compile into mach-o files?

  • From the figure below, we can see that it is compiled from OC -> assembly -> machine language step in the past, that can be decompiled back? Since we can get the Mach-o file, the answer is: decompile to assembly, but not 100% from assembly to OC.

  • Since the compiled assembly code may be the same for different OC codes from OC to assembly, it is not possible to decompile 100% from assembly to OC.

  • It’s not 100%, but it’s probably 50-60%, just to get a sense of it, and I’ll talk about the Hopper Disassmbler tool in the next chapter, It can decompile the machine-language code of a Mach-O file into assembly code, OC pseudocode, or Swift code.