简体   繁体   English

Xcode 3 个项目在 Xcode 4

[英]Xcode 3 projects in Xcode 4

I just upgraded from Xcode 3 to 4. Have been playing around a bit first to get used to the new interface and trying to find where everything has moved to... (pfffff).我刚刚从 Xcode 3 升级到 4。我已经先玩了一下以适应新界面并试图找到所有东西都转移到了哪里......(pfffff)。 New projects seem to work fine but it's definitely a large transition.新项目似乎运作良好,但这绝对是一个巨大的转变。

Now I tried opening some older projects but something strange happens... ALL my projects are iPhone projects, none is for OS X but when opened in Xcode 4 it says in the left most pane: 1 target, missing base SDK.现在我尝试打开一些较旧的项目,但发生了一些奇怪的事情......我所有的项目都是 iPhone 项目,没有一个项目适用于 OS X,但是当在 Xcode 4 中打开时,它在最左侧的窗格中显示:1 个目标,缺少基础 SDK。 In the right pane I see: Mac OS X Application Target, everything in the Targets Section is related to OS X and NOT to iPhone.在右窗格中,我看到:Mac OS X 应用程序目标,目标部分中的所有内容都与 OS X 相关,而不与 iPhone 相关。

I tried adding a target for iPhone, but still the target is missing.我尝试为 iPhone 添加一个目标,但仍然缺少目标。 I then deleted the OS X target and see in the left pane: 1 target, IOS SDK 4.3 but the "Run" option in Project menu is still disabled.然后我删除了 OS X 目标并在左窗格中看到:1 个目标,IOS SDK 4.3 但项目菜单中的“运行”选项仍然被禁用。

I also tried this with sample files from tutorials I used in the past (eg Beginning iPhone 3 Development en More iPhone 3 development) but I have the same problem!我还尝试使用我过去使用的教程中的示例文件(例如,开始 iPhone 3 开发和更多 iPhone 3 开发),但我遇到了同样的问题!

1) Shouldn't Xcode open those Xcode 3 projects just fine? 1) Xcode 不应该打开那些 Xcode 3 个项目就好了吗? 2) What can I do to have the "Run" option working again? 2) 我该怎么做才能让“运行”选项再次工作?

You need to set two Build Settings:您需要设置两个构建设置:

  1. For Base SDK - set this to Latest iOS对于基础 SDK - 将此设置为最新 iOS
  2. For Deployment Target - set this to iOS 4.3 (or whatever the minimum SDK is that you want your app to work on.对于部署目标 - 将其设置为 iOS 4.3(或任何您希望应用程序运行的最小 SDK 。

Related to point 1 - if you hard code the SDK version here, then whenever it's upgraded, you'll likely get error messages about missing SDKs if the old one is removed与第 1 点相关 - 如果您在此处硬编码 SDK 版本,那么无论何时升级,如果删除旧的 SDK,您可能会收到有关缺少 SDK 的错误消息

Yo have to try this You have to select your project then in middle pane you have to select "Targets" and then go to "Build Settings" tab and in base SDK select "IOS 4.3". Yo have to try this You have to select your project then in middle pane you have to select "Targets" and then go to "Build Settings" tab and in base SDK select "IOS 4.3".

Your project -->Targets(your Project Name) -->Build Settings -->Base SDK --> IOS 4.3您的项目 --> 目标(您的项目名称) --> 构建设置 --> 基础 SDK --> IOS 4.3

You need to set Base SDK and IOS Deployment Target.您需要设置 Base SDK 和 IOS 部署目标。 My Xcode 3 projects works fine after that.之后我的 Xcode 3 项目工作正常。

If you select your project, in the editor window you get the PROJECT and TARGETS to work with.如果您的项目是 select,则在编辑器 window 中,您可以使用PROJECTTARGETS You can set proper values their.您可以为其设置适当的值。

You may need to do more things.你可能需要做更多的事情。 In Xcode4 configurations are managed using Scheme.在 Xcode4 中,配置使用 Scheme 进行管理。 So, Go to Menu -> Product -> Manage Scheme , Select your scheme, and Edit your scheme.因此,Go 到Menu -> Product -> Manage Scheme , Select 您的方案,然后编辑您的方案。

You may relieved off some issues there.你可能会在那里缓解一些问题。

You need to follow both answer, set the base SDK and manage the SCHEME.some times you may not see the iphone simulator option in the dropdown list then go to Manage scheme change debug to release then you may see the iphone simulator in dropdown and change it back to debug mode.您需要遵循两个答案,设置基本 SDK 并管理 SCHEME。有时您可能在下拉列表中看不到 iphone 模拟器选项,然后 go 到 Manage scheme change debug to release 然后您可能会在下拉列表中看到 iphone 模拟器并更改它回到调试模式。

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

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