简体   繁体   English

升级到带操作系统4.0的XCode 3.2.3 Beta4后,未列出iPhone模拟器3.x.

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

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 Device&Simulator 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. 现在,更新到Xcode 3.2.3 Beta 4(OS 4.0支持),它不再为XCode中的模拟器或设备列出3.x SDK。 When I run an app that was written for 3.1.2, the current SDK is listed as "base SDK missing" 当我运行为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无济于事。

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. 你应该阅读: http//www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/这很好地解释了基础SDK和部署目标之间的区别 - 简而言之,基础SDK是您期望支持的最高SDK版本,而部署目标是您将支持的最低版本。 You need to make sure both are properly selected, and that your code will support the functionality from those SDKs properly. 您需要确保两者都已正确选择,并且您的代码将正确支持这些SDK的功能。

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. iPhone OS 4 beta 4仅用于开发目的。 This software should only be installed on devices dedicated exclusively for iPhone OS 4 beta application development. 该软件只能安装在专门用于iPhone OS 4 beta应用程序开发的设备上。 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应用程序开发的设备,请不要安装此软件。

I would recommend you install the 3.x sdk in parallel to the 4.0. 我建议您将3.x sdk与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. 我将两个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. 在安装sdk时,安装到另一个文件夹的选项有点难以注意,但诀窍是按“安装类型”步骤上的默认目录点击向上/向下箭头。 After hitting them it will allow you to choose a different directory. 点击它们后,它将允许您选择不同的目录。

替代文字

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可能仍会发生变化。

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. 它可能会说“3.1(缺失)”,因为他们从XCode 3.2.3中删除了它。 Change it to 3.2 or 4.0 and you should be up & running again. 将其更改为3.2或4.0,您应该再次启动并运行。

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. 我在我的iphone上运行新的os4.0和新的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. 我必须将我的BAse SDK设置为4.0,但随后在“获取信息>构建”中,然后向下滚动到“部署”部分。 Last option should say iPhone OS Deployment Target. 最后一个选项应该是iPhone OS Deployment Target。

You can choose all the way back to os 1.0 你可以选择一直回到os 1.0

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

It may be worth trying before going the brute force route. 在走蛮力路线之前可能值得尝试。

Regards. 问候。

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

To display the iPhone OS Deployment Target right click on the project and go to Get Info. 要显示iPhone OS部署目标,请右键单击项目并转到“获取信息”。 There is a "Show" drop down, select "All Settings", at the bottom of the Deployment section is the iPhone Deployment Target. 有一个“显示”下拉菜单,选择“所有设置”,在部署部分的底部是iPhone部署目标。

If iPhone OS Deployment Target is completely missing under Deployment, and you're looking at All Settings for 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) xcodeproj bundle. 在我的例子中,我在Xcode中关闭了项目,然后打开了项目的(工作) xcodeproj包。 For those not in the know, just right-click the xcodeproj "file" and pick Show Package Contents ( xcodeproj is actually a directory). 对于那些不知情的人,只需右键单击xcodeproj “文件”并选择Show Package Contentsxcodeproj实际上是一个目录)。 After backing up project.pbxproj for safety, look under the buildSettings of every XCBuildConfiguration and make sure these two lines appear: 在备份之后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. 这将Base SDK定位为iOS 4.0(设备,非模拟器),但将部署目标设置为最低iOS 3.0。 It even shows up properly in Xcode once you re-open the project. 一旦重新打开项目,它甚至会在Xcode中正确显示。 Problem solved! 问题解决了!

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

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