使用 OS 4.0 升级到 XCode 3.2.3 Beta4 后未列出 iPhone Simulator 3.x

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2932129/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:23:58  来源:igfitidea点击:

iPhone Simulator 3.x not listed after upgrading to XCode 3.2.3 Beta4 with OS 4.0

iphonexcodeios4

提问by Jon

When I last installed Xcode 3.2.3 Beta 2 (OS 4.0 support), it had all the iPhone Device & Simulator 3.x.

当我上次安装 Xcode 3.2.3 Beta 2(OS 4.0 支持)时,它拥有所有 iPhone 设备和模拟器 3.x。

Now, updated to Xcode 3.2.3 Beta 4 (OS 4.0 support), it no longer lists 3.x SDKs for either simulator or device in XCode. When I run an app that was written for 3.1.2, the current SDK is listed as "base SDK missing"

现在,更新到 Xcode 3.2.3 Beta 4(OS 4.0 支持),它不再在 XCode 中列出模拟器或设备的 3.x SDK。当我运行为 3.1.2 编写的应用程序时,当前的 SDK 被列为“缺少基本 SDK”

I'm aware that 3.2.3 changes the BASE SDK to 4.0, but how come none of the 3.x devices are available either?

我知道 3.2.3 将 BASE SDK 更改为 4.0,但为什么 3.x 设备也不可用?

When I go to:

当我去:

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs

The only two files available are:

唯一可用的两个文件是:

iPhoneSimulator3.2.sdk
iPhoneSimulator4.0.sdk

However, when I go to:

但是,当我去:

/Developer/Platforms/iPhoneOS.platform/DeviceSupport

3.0
3.0.1
3.1
3.1.1
3.1.2
3.1.3
3.2
4.0 (8A274b)

I've tried re-installing the most recent XCode DMG to no avail.

我试过重新安装最新的 XCode DMG 无济于事。

采纳答案by Brad The App Guy

It seems like they removed them.

似乎他们删除了它们。

If you are developing for the older OS, you should not be using the 4.0 Beta SDK.

如果您正在为较旧的操作系统进行开发,则不应使用 4.0 Beta SDK。

According to the release notes:

根据发行说明:

iPhone OS 4 beta 4 is for development purposes only. This software should only be installed on devices dedicated exclusively for iPhone OS 4 beta application development. Do not install this software if you do not have a device dedicated exclusively to iPhone OS 4 beta application development.

iPhone OS 4 beta 4 仅用于开发目的。该软件只能安装在专用于 iPhone OS 4 beta 应用程序开发的设备上。如果您没有专门用于 iPhone OS 4 beta 应用程序开发的设备,请不要安装此软件。

I would recommend you install the 3.x sdk in parallel to the 4.0. I keep the two Developer directories on my machine /Developer for maintaining apps written for 3.0 and 3.1, and /Developer4.0Beta for migrating apps to 4.0, and trying out the new features that will be available soon.

我建议您与 4.0.x 并行安装 3.x sdk。我在我的机器上保留了两个 Developer 目录 /Developer 用于维护为 3.0 和 3.1 编写的应用程序,以及 /Developer4.0Beta 用于将应用程序迁移到 4.0,并尝试即将推出的新功能。

The option to install to another folder is a bit hard to notice when installing the sdk, but the trick is to hit the up/down arrows by the default directory on the 'Installation Type' step. After hitting them it will allow you to choose a different directory.

在安装 sdk 时,安装到另一个文件夹的选项有点难以注意到,但诀窍是在“安装类型”步骤中按默认目录点击向上/向下箭头。点击它们后,您可以选择不同的目录。

alt text

替代文字

Remember, that App;le won't allow you to submit an App built with a Beta SDK, so I would only use the 4.0 Beta for building 4.0 Apps, keeping in mind that the APIs might still change before the GM is released.

请记住,App;le 不允许您提交使用 Beta SDK 构建的应用程序,因此我只会使用 4.0 Beta 构建 4.0 应用程序,请记住,在 GM 发布之前,API 可能仍会更改。

回答by pixel

You should read: http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/This explains very nicely the difference between the Base SDK and Deployment Target -- in short, the Base SDK is the highest SDK version you expect to support, whereas the Deployment Target is the lowest version you will support. You need to make sure both are properly selected, and that your code will support the functionality from those SDKs properly.

您应该阅读:http: //www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/这很好地解释了 Base SDK 和 Deployment Target 之间的区别——简而言之,Base SDK 是您希望支持的最高 SDK 版本,而部署目标是您将支持的最低版本。您需要确保两者都被正确选择,并且您的代码将正确支持这些 SDK 的功能。

回答by Matt Good

Yeah, I was just banging my head against this one for a while too. It turns out you need to modify your project settings (right-click project > "Get Info") here:

是的,我也只是用头撞了一下这个。事实证明,您需要在此处修改项目设置(右键单击项目>“获取信息”):

XCode project settings http://img.skitch.com/20100609-fk9aq46eyibf4ceftr6famdbt9.png

XCode 项目设置 http://img.skitch.com/20100609-fk9aq46eyibf4ceftr6famdbt9.png

It will probably say "3.1 (missing)" since they removed that from XCode 3.2.3. Change it to 3.2 or 4.0 and you should be up & running again.

它可能会说“3.1(丢失)”,因为他们从 XCode 3.2.3 中删除了它。将其更改为 3.2 或 4.0,您应该会再次启动并运行。

回答by whatiwant

Changing the iPhone OS Deployment Target fixes this issue, just as nicktmro mentioned above.

更改 iPhone 操作系统部署目标解决了这个问题,就像上面提到的 nicktmro 一样。

I am running the new os4.0 on my iphone and the new 4.0sdk. I had to set my BAse SDK as 4.0, but then in the "Get Info> Build" then scroll down to Deployment section. Last option should say iPhone OS Deployment Target.

我在我的 iphone 和新的 4.0sdk 上运行新的 os4.0。我必须将我的 Base SDK 设置为 4.0,但随后在“获取信息>构建”中向下滚动到部署部分。最后一个选项应该是 iPhone OS 部署目标。

You can choose all the way back to os 1.0

可以一路选择回os 1.0

回答by mikeq

This is for those of us who are only seeing the MacOSX deployment target when we change the Base SDK version at the project level. I found that if I only set the Base SDK to iPhone OS 4.0 at the project level, I didnt' get the iPhone OS Deployment Target option. If I set the BaseSDK and iPhone OS Deployment Target at the target level (which showed up immediately after changing the SDK), I could then go back to the project and see the iPhone OS Deployment Target setting.

这适用于我们这些在项目级别更改 Base SDK 版本时只看到 MacOSX 部署目标的人。我发现如果我只在项目级别将 Base SDK 设置为 iPhone OS 4.0,我没有得到 iPhone OS 部署目标选项。如果我将 BaseSDK 和 iPhone OS 部署目标设置在目标级别(更改 SDK 后立即显示),然后我可以返回到项目并查看 iPhone OS 部署目标设置。

It may be worth trying before going the brute force route.

在走蛮力路线之前可能值得尝试。

Regards.

问候。

回答by kevin rahilly

To display the iPhone OS Deployment Target right click on the project and go to Get Info. There is a "Show" drop down, select "All Settings", at the bottom of the Deployment section is the iPhone Deployment Target.

要显示 iPhone OS 部署目标,请右键单击该项目并转到“获取信息”。有一个“显示”下拉菜单,选择“所有设置”,在部署部分的底部是 iPhone 部署目标。

回答by Joe D'Andrea

If iPhone OS Deployment Targetis completely missingunder Deployment, and you're looking at All Settingsfor All Configurations, you may need to brute force things.

如果iPhone OS部署目标是完全缺失的部署之下,你看所有设置所有配置,您可能需要蛮力的事情。

In my case, I closed the project in Xcode, then opened the project's (working) xcodeprojbundle. For those not in the know, just right-click the xcodeproj"file" and pick Show Package Contents(xcodeprojis actually a directory). After backing up project.pbxprojfor safety, look under the buildSettingsof every XCBuildConfigurationand make sure these two lines appear:

就我而言,我在 Xcode 中关闭了项目,然后打开了项目的(工作)xcodeproj包。对于不知道的人,只需右键单击xcodeproj“文件”并选择“显示包内容”xcodeproj实际上是一个目录)。备份后project.pbxproj的安全,看看下buildSettings的每一个XCBuildConfiguration,并确保这两条线出现:

IPHONEOS_DEPLOYMENT_TARGET = 3.0;
SDKROOT = iphoneos4.0;

This will target the Base SDK as iOS 4.0 (Device, NOT Simulator), but set the Deployment target to a minimum of iOS 3.0. It even shows up properly in Xcode once you re-open the project. Problem solved!

这会将 Base SDK 定位为 iOS 4.0(设备,而不是模拟器),但将部署目标设置为最低 iOS 3.0。一旦您重新打开项目,它甚至会在 Xcode 中正确显示。问题解决了!

回答by nicktmro

Even though 3.x is not listed you can still specify it as a target under iPhone OS Deployment Target.

即使未列出 3.x,您仍然可以将其指定为 iPhone OS 部署目标下的目标。