Cross-development refers to the ability to develop software that can be deployed on, and take advantage of features from, specified versions of Mac OS X, including versions different from the one you are developing on.
Cross-development support is available starting with the Xcode Tools distributed with Mac OS X version 10.3 and later. It includes Software Development Kits (SDKs), which are complete sets of header files and stub libraries as shipped in previous versions of Mac OS X. To use cross-development, you specify which version (or SDK) of Mac OS X to build with. When you choose an SDK, your software is built just as though you were building in that version of the operating system. You can also specify the earliest Mac OS X system version on which your software will run.
Important: You cannot use cross-development in Xcode unless, when you install the Xcode development tools, you install all the cross-development SDKs you plan to work with. During installation, after selecting an installation disk, click the Customize button and select the Cross-Development checkbox.
The Mac OS X 10.1 SDK is no longer shipped with the Xcode Tools. If you want to develop for Mac OS X version 10.1.5, you can obtain this SDK package as part of the Xcode Legacy Tools package, available in the Downloads section of the ADC Member Site. Note that you must install both GCC 2.95.2 and the Mac OS X 10.1.5 SDK.
You can take advantage of cross-development in a number of ways:
You can build a target that is optimized for one version of the operating system and is forward-compatible with later versions but doesn’t take specific advantage of their features.
You can build a target for a range of operating system versions, so that it can still launch in older versions but can take advantage of features in newer ones. This allows you to deliver software that provides new value to customers who have upgraded to a new system version, but still runs for those who haven't.
You can have one project with separate subprojects (for example, for bundles or frameworks) for different system versions, so your software can load and execute platform-specific code without having to test for operating system version or function availability throughout the code.
In Mac OS X v10.4 and later, you can use GCC 4.0 to add cross-development support to makefile-based projects.
For possible development issues, see “Limitations.”
This document contains the following:
“How Cross-Development Works” describes how this feature is supported in Xcode and lists some limitations you may encounter.
“Using Cross-Development” shows how to set up cross-development in your project and how to deal with undefined functions.
“Cross-Development and Universal Binaries” describes how to use cross-development to build for Mac OS X v10.4 for Intel-based Macintosh computers while supporting earlier versions of Mac OS X for PowerPC-based Macintosh computers.
“Determining the Version of a Framework” describes how to check at runtime for new features in the Application Kit or Foundation frameworks using the framework version.
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-11-07)