如何在 Xcode 10 中设置以前的基础 SDK?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/54857416/
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
How do I set a previous base SDK in Xcode 10?
提问by Sean Dawson
In earlier versions of Xcode I could set the base SDK to the current iOS version and the deployment target to an earlier version as shown in the below slide from the iOS 7 TechTalk, session Architecting Modern Apps, Part 2:
在早期版本的 Xcode 中,我可以将基本 SDK 设置为当前的 iOS 版本,并将部署目标设置为早期版本,如下面来自 iOS 7 TechTalk 会话架构现代应用程序,第 2 部分的幻灯片所示:
This Stack Overflow question elaborates nicely on the Base SDK vs Deployment target.
这个堆栈溢出问题很好地阐述了基础 SDK 与部署目标。
What's the meaning of Base SDK, iOS deployment target, Target, and Project in xcode
xcode中Base SDK、iOS部署目标、Target、Project是什么意思
However, now when I look at the base SDK config field in Xcode I just see "iOS" (which is an alias of "iphoneos").
但是,现在当我查看 Xcode 中的基本 SDK 配置字段时,我只看到“iOS”(它是“iphoneos”的别名)。
According to https://developer.apple.com/ios/submit/
根据https://developer.apple.com/ios/submit/
Starting March 2019, all iOS apps submitted to the App Store will need to be built with the iOS 12.1 SDK or later, and support the all-screen design of iPhone XS Max or the 12.9-inch iPad Pro (3rd generation).
从 2019 年 3 月开始,所有提交到 App Store 的 iOS 应用程序都需要使用 iOS 12.1 SDK 或更高版本构建,并支持 iPhone XS Max 或 12.9 英寸 iPad Pro(第 3 代)的全面屏设计。
This worries me because it seems that I can no longer target older versions of iOS.
这让我很担心,因为我似乎无法再针对旧版本的 iOS。
I've done a lot of research by I cannot seem to work out definitively whether there still a way to use the 12.1 SDK but target older versions of iOS. Is there a way to do this?
我已经做了很多研究,但我似乎无法确定是否仍然可以使用 12.1 SDK 但针对旧版本的 iOS。有没有办法做到这一点?
回答by Paulw11
The base SDK is just "iOS". The exact version will depend on your version of Xcode (12.1 if you are using Xcode 10.1). The base SDK does not determine which versions of iOS are supported by your app.
基础 SDK 只是“iOS”。确切的版本将取决于您的 Xcode 版本(如果您使用的是 Xcode 10.1,则为 12.1)。基础 SDK 无法确定您的应用支持哪些 iOS 版本。
You set the minimum version your app is compatible with by specifying the "iOS deployment target", either for your project as a whole:
您可以通过为整个项目指定“iOS 部署目标”来设置您的应用程序兼容的最低版本:
or in the settings for a specific target in your project
或在项目中特定目标的设置中
The oldest version of iOS that you can target with Xcode 10 is iOS 8 (which is pretty old).
您可以使用 Xcode 10 定位的最旧的 iOS 版本是 iOS 8(它已经很老了)。