Understanding the binary format
For systems that are based on the Mach Kernel, such as macOS and iOS, Mach-O is the format that's used for the executable files and shared libraries. Mach-O stands for Mach object file format. The applications are expected to run on different processor types, for the most part. Owing to this, the executable code should be native to different instruction sets.
Depending on the instruction sets it contains, a binary file is called a thin binary if it contains a single executable file for one architecture; it's called a fat binary if it contains code for different CPU instruction sets in a single file – that is, it has been fattened (or expanded).
Each binary file begins with a header (called a mach header) that contains a magic number that can be used to identify it. For a thin binary file, the header contains one magic number; however, for a fat binary, the header is a fat header. The fat header contains the locations of the mach...