I am coming from windows development. I have known that a binary can either be a 32bit or 64bit. But not both. And also that on a 64bit platform I can run 32bit binary but not viceversa.
In mac I am seeing a combined architecture like i386 x86_64 which is a bit of surprise for me. Why and when exactly do we target an app on mac osx for this architecture , what is the benefit of this ? why not a 32bit only which per my understanding of windows can run on 32bit as well as 64bit ?
It’s not that the code is compiled for a “mixed” architecture – it’s just that it’s compiled for multiple ones.
The reason for compiling it for both 32 and 64 bit is that 64-bit programs generally perform better on a 64-bit architecture (most modern Macs) than 32-bit ones.