Introduction

Universal Binary Programming Guidelines will assist experienced developers to build and modify their Mac OS X applications to run as universal binaries. Universal binaries run natively on Macintosh computers using PowerPC or Intel microprocessors and deliver optimal performance for both architectures in a single package.

This document is designed to help developers determine exactly how much work needs to be done and provides useful tips for general as well as specific code modification scenarios. It describes the prerequisites for building code as a universal binary and shows how to do so using Xcode 2.2. It also discusses the differences between the Intel and PowerPC architectures that can affect code behavior and provides guidelines for ensuring that universal binary code builds correctly.

This version of Universal Binary Programming Guidelines represents a significant update since its introduction at the Apple Worldwide Developers Conference in June, 2005. It brings together all the information that developers need to make the transition to Intel-based Macintosh computers. This version includes pointers to newly revised tools documentation—Building Universal Binaries, GCC Porting Guide, SDK Compatibility Guide, and more—as well as improved guidelines and tips. Anyone who has an older version of Universal Binary Programming Guidelines will want to replace it with this version.

Who Should Read This Document?

Any developer who currently has an application that runs in Mac OS X will want to read this document to learn how to modify their code so that it runs natively on all current Apple hardware. Developers who have not yet written an application for the Macintosh, but are planning to do so, will want to follow the guidelines in the document to ensure that their code can run as a universal binary.

Organization of This Document

This document is organized into the following chapters:

This document contains the following appendixes:

Assumptions

The document assumes the following:

Conventions

The term x86 is a generic term used in some parts of this book to refer to the class of microprocessors manufactured by Intel. This book uses the term x86 as a synonym for IA-32 (Intel Architecture 32-bit).