简体   繁体   中英

How do I set a previous base SDK in Xcode 10?

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:

iOS 7 TechTalk,会话架构现代应用程序,第 2 部分

This Stack Overflow question elaborates nicely on the Base SDK vs Deployment target.

What's the meaning of Base SDK, iOS deployment target, Target, and Project in xcode

However, now when I look at the base SDK config field in Xcode I just see "iOS" (which is an alias of "iphoneos").

According to 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).

This worries me because it seems that I can no longer target older versions of 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?

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.

You set the minimum version your app is compatible with by specifying the "iOS deployment target", either for your project as a whole:

在此处输入图片说明

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).

BTW, you can see or select the Base SDK you are using, in the Xcode Preferences/Locations:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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