缺少 Xcode iOS 基础 SDK

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11235759/
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-15 00:42:55  来源:igfitidea点击:

Xcode iOS Base SDK Missing

iosxcodesdktarget

提问by Linda

I have an old iOS app that I never distributed and am now trying to work on the project again. It worked fine with an earlier version of Xcode but I was not ready to deploy it at that time. Now I am using the current version of Xcode but I have an error that there is a missing base SDK. I have explored every posting here with that error message and they did not work for me.

我有一个从未分发过的旧 iOS 应用程序,现在正在尝试再次处理该项目。它适用于早期版本的 Xcode,但当时我还没有准备好部署它。现在我使用的是当前版本的 Xcode,但我有一个错误,提示缺少基础 SDK。我已经使用该错误消息浏览了此处的每个帖子,但它们对我不起作用。

On investigation in Xcode. I can choose my app under "Project" pane. With the Info tab chosen, it has under Deployment Target as "Mac OS X Deployment Target" and Default in the drop list.

在 Xcode 中进行调查。我可以在“项目”窗格下选择我的应用程序。选择信息选项卡后,它在部署目标下作为“Mac OS X 部署目标”和下拉列表中的默认值。

This is an iOS app and not a Mac OS X app. How do I change this?

这是一个 iOS 应用程序,而不是 Mac OS X 应用程序。我该如何改变?

I already have the base SDK as the Latest iOS.

我已经将基础 SDK 作为最新的 iOS。

Suggestions?

建议?

回答by CReaTuS

Try this:

尝试这个:

  1. Open Xcode and Press cmd + 1

  2. In left panel choose your project -> Your target in center panel-> Build Settings in right panel

  3. Find "Base SDK" and choose "Latest iOS". If you see a Release and Debug lines, then choose this for both Release and Debug.

  4. Restart your Xcode

  1. 打开 Xcode 并按 cmd + 1

  2. 在左侧面板中选择您的项目 -> 中间面板中的目标 -> 右侧面板中的构建设置

  3. 找到“Base SDK”并选择“Latest iOS”。如果您看到 Release 和 Debug 行,则为 Release 和 Debug 选择此项。

  4. 重启你的 Xcode

回答by Rob

Usually when you see this, it's when you've got an old iOS project and you're using a version of Xcode that uses a newer base iOS. In those cases, you can click on the target on the top of the tree structure of the Project Navigator on the left, and you'll see the project settings. There's a button labelled "Validate Settings" and will show up near the lower center portion of the main panel. Click on it.

通常当你看到这个时,是当你有一个旧的 iOS 项目并且你正在使用一个使用较新的基本 iOS 的 Xcode 版本时。在这些情况下,您可以单击左侧项目导航器树结构顶部的目标,您将看到项目设置。有一个标记为“验证设置”的按钮,它将显示在主面板的下部中间部分附近。点击它。

If that doesn't do it (e.g. it's from a reallyold version and Xcode can't figure out how to remedy it), it might be easier to recreate the project. Create a new iOS project and then copy your source code, its NIBs and resources into that project. Maybe that will be easier than trying to fix the old project you have.

如果这不起作用(例如,它来自一个非常旧的版本并且 Xcode 无法弄清楚如何修复它),则重新创建项目可能会更容易。创建一个新的 iOS 项目,然后将您的源代码、其 NIB 和资源复制到该项目中。也许这比尝试修复您拥有的旧项目更容易。