简体   繁体   English

Xcode iOS Base SDK丢失

[英]Xcode iOS Base SDK Missing

I have an old iOS app that I never distributed and am now trying to work on the project again. 我有一个我从未分发的旧iOS应用程序,现在我正在尝试再次处理该项目。 It worked fine with an earlier version of Xcode but I was not ready to deploy it at that time. 它与早期版本的Xcode一起运行良好,但我当时还没准备好部署它。 Now I am using the current version of Xcode but I have an error that there is a missing base SDK. 现在我正在使用当前版本的Xcode,但我有一个错误,即缺少基础SDK。 I have explored every posting here with that error message and they did not work for me. 我已经使用该错误消息探讨了每个帖子,但它们对我不起作用。

On investigation in Xcode. 关于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. 选择“信息”选项卡后,它在“部署目标”下显示为“Mac OS X部署目标”,并在“下拉列表”中显示“默认”。

This is an iOS app and not a Mac OS X app. 这是一个iOS应用程序,而不是Mac OS X应用程序。 How do I change this? 我该如何改变?

I already have the base SDK as the Latest iOS. 我已经将基础SDK作为最新的iOS。

Suggestions? 建议?

Try this: 试试这个:

  1. Open Xcode and Press cmd + 1 打开Xcode并按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". 找到“Base SDK”并选择“最新iOS”。 If you see a Release and Debug lines, then choose this for both Release and Debug. 如果您看到Release和Debug行,则为Release和Debug选择它。

  4. Restart your Xcode 重启你的Xcode

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. 通常当你看到这个时,就是你有一个旧的iOS项目而你正在使用一个使用更新的基础iOS的Xcode版本。 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. 在这些情况下,您可以单击左侧Project Navigator树结构顶部的目标,您将看到项目设置。 There's a button labelled "Validate Settings" and will show up near the lower center portion of the main panel. 有一个标有“验证设置”的按钮,将显示在主面板下部中心部分附近。 Click on it. 点击它。

If that doesn't do it (eg it's from a really old version and Xcode can't figure out how to remedy it), it might be easier to recreate the project. 如果不这样做(例如,它来自一个非常旧的版本而Xcode无法弄清楚如何补救它),那么重建项目可能会更容易。 Create a new iOS project and then copy your source code, its NIBs and resources into that project. 创建一个新的iOS项目,然后将源代码,其NIB和资源复制到该项目中。 Maybe that will be easier than trying to fix the old project you have. 也许这比试图修复你的旧项目更容易。

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

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