简体   繁体   English

为什么iPhone模拟器3.0没有出现在Xcode中?

[英]Why is the iPhone Simulator 3.0 not showing up in Xcode?

I have installed the new 3.0 SDK, but when I start up Xcode, I don't see an option to build for "Device - iPhone OS 3.0" or "Simulator - iPhone OS 3.0" 我已经安装了新的3.0 SDK,但是当我启动Xcode时,我没有看到为“Device - iPhone OS 3.0”或“Simulator - iPhone OS 3.0”构建的选项

The Xcode About box says I am running: 3.1.2 Xcode About框说我正在运行:3.1.2

Is there something else I have to do? 我还有别的办法吗?

I think you need to upgrade to Xcode 3.1.3. 我认为你需要升级到Xcode 3.1.3。 I have the latest version and that's what my About box reads. 我有最新版本,这就是我的关于框的内容。

If you are sure you downloaded the latest version, perhaps you installed in to a different location? 如果您确定已下载最新版本,可能是安装在其他位置?

If you are using an existing project you may have to tell your project to build to the 3.0 targets. 如果您使用的是现有项目,则可能需要告知项目构建3.0目标。 I didn't have to do this for any of my projects but ... 我没有必要为我的任何项目做这个,但......

Under the Deployment section of your project properties you should see: 在项目属性的“部署”部分下,您应该看到:

iPhone OS Deployment Target - (change this to use iPhone OS 3.0) iPhone OS部署目标 - (将其更改为使用iPhone OS 3.0)

You can also check that the Architectures section has the Base SDK set to 3.0. 您还可以检查“架构”部分是否已将Base SDK设置为3.0。

This is what worked for me: 这对我有用:

I clicked on the box (where I expected iPhone Simulator to be shown), right clicked manage scheme. 我点击了该框(我预计会显示iPhone模拟器),右键单击管理方案。 After that deleted all schemes, and in similar way, created a new scheme. 之后删除了所有方案,并以类似的方式创建了一个新方案。 It automatically produced all simulators including the ones for devices. 它会自动生成所有模拟器,包括用于设备的模拟器。

This happens quite often when downloading Apple's sample code projects which are targeted for iOS 3.x but you've got iOS 4.x. 下载Apple的示例代码项目时会经常发生这种情况,这些项目针对的是iOS 3.x但你已经拥有了iOS 4.x.

To show Simulator option go to Project Info window -> General tab -> Base SDK for All Configurations - choose Latest iOS. 要显示模拟器选项,请转到项目信息窗口 - >常规选项卡 - >所有配置的基础SDK - 选择最新的iOS。

If it doesn't appear straight away, close and reopen Xcode. 如果它没有立即出现,请关闭并重新打开Xcode。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM