您需要将项目或应用程序的Mac OS X部署目标设置(密钥名称:MACOSX_DEPLOYMENT_TARGET)更改为您要支持的最旧的操作系统.
以下是有关如何更改目标的基本构建设置的文档:http://developer.apple.com/library/mac/documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Building/Building.html#//apple_ref/doc/uid/TP40010215-CH9-SW2
这里有一个指向文档的链接,其中包含更多信息,可以为多个版本的操作系统构建.
我找不到在线链接,因此这是您本地安装的文档的链接.
file:///Library/Developer/Documentation/DocSets/com.apple.adc.documentation.AppleiPhone4_0.iPhoneLibrary.docset/Contents/Resources/Documents/documentation/DeveloperTools/Conceptual/XcodeProjectManagement/210-Building_Products/building.html#//apple_ref/doc/uid/TP40002693-SW38
You can develop software that can be deployed on,and take advantage of features from,different versions of iPhone OS or Mac OS X,including versions different from the one you are developing for. This capability is known as cross-development.
In order to take advantage of cross-development,you must install the Mac OS X SDKs for the OS versions you plan on targeting. Then,in your projects,specify which SDK to use when building your products. You can also specify the earliest Mac OS X release on which the software must run.
In some cases,Apple distributes an SDK for an upcoming version of the operating system as a seed,allowing you to prepare your application to work with future versions of the Mac OS X before they have been released to the general public.
Important: Cross-development in Xcode requires native targets.
To set up your Xcode project to target multiple Mac OS X releases,take the following steps:
?Choose an SDK. Select your project in the Groups & Files list and choose File > Get Info. In the General pane of the Project Info window,choose the SDK from the Base SDK for All Configurations pop-up menu. When you choose an SDK,Xcode builds targets in your project against the set of headers corresponding to the specified version of the OS,and links against the stub libraries in that SDK. This allows you to build products on your development computer that can be run on the OS release targeted by the SDK. Your software can use features available in system versions up to and including the one you select.
You can also specify the Base SDK through the Base SDK (SDKROOT) build setting.
?Choose a deployment version Mac OS X. If your software must run on a range of operating system versions,choose a Mac OS X deployment operating system for each individual target that requires one. The deployment operating system identifies the earliest system version on which the software can run. By default,this is set to the version of the OS corresponding to the SDK version.
To set the deployment version for a target:
? a. Select the target in the Groups & Files list and open an Info window. Click Build to open the Build pane.
b. Find the Deployment Target (MACOSX_DEPLOYMENT_TARGET
) or iPhone OS Deployment Target (IPHONEOS_DEPLOYMENT_TARGET
) build setting (depending on which platform you’re developing for) and choose a deployment operating system from the pop-up menu in the Value column.
For each target,supply a prefix file that takes into account the selected SDK. To use an umbrella framework header from an SDK as your prefix file,add the appropriate #include directive to your target’s prefix file instead of setting a Prefix Header path to the umbrella framework header directly. There is a lot more to successfully developing software for multiple versions of the Mac OS. For more information see SDK Compatibility Guide.