Universal Binary

From Mac Guides

Jump to: navigation, search

A Universal Binary is a term used by Apple for "fat" applications which include executable code for both PPC and Intel processors. Applications with only PPC code will run natively on PPC Macs and run through emulation on Intel Macs using a technology called Rosetta. Applications with only Intel code will run natively on Intel Macs, but won't run at all on PPC Macs.

Universal Binaries were announced by Apple CEO Steve Jobs at the WWDC 2005, when he announced that Apple would begin a transition from PowerPC to Intel processors. They can be built using Xcode 2.1 and newer.

As of WWDC 2006, there were over 3000 Universal Binary applications released.

Detection

To tell what processor a particular application was built for, simply choose the application in Finder and chose File > Get Info.

Image:Itunesuniversal.png

  • Universal means it was written for both PowerPC and Intel.
  • PowerPC means it was only written for PowerPC and will use Rosetta when run on an Intel Mac.
  • Intel means it was only written for Intel and will only run on an Intel Mac.


You can also use the lipo command line tool to inspect an executable, for example

 QuadG5:~ shawnce$ lipo -info /Applications/iTunes.app/Contents/MacOS/iTunes 
 Architectures in the fat file: /Applications/iTunes.app/Contents/MacOS/iTunes are: ppc i386
  • ppc means the executable contains a PowerPC version of the executable.
  • i386 means the executable contains a Intel (IA32) version of the exectuable.
  • If you see both ppc and i386 the executable is considered Universal.

Application Size

Since Universal Binaries contain twice the code of a single platform application, they can be up to twice the size. In most cases, however, the size increase is much less, as resource files such as images, sounds and interface files are platform independent. Most applications will only increase by about 10-20%, although it greatly depends on the application. Smaller applications (thus less likely to have many resources) are more likely to see larger increases.

Although the size increase is of little concern to most, since applications generally do not take up a large proportion of hard disk space, it is of small concern to some. Larger download sizes will result in higher bandwidth costs for software firms, and downloads will take slightly longer, affecting modem users more than anyone else.

See Also