简体   繁体   English

如何知道我的XCode将部署到哪些iOS版本?

[英]How can I tell which iOS versions my XCode will deploy to?

I currently have XCode version 8.2.1. 我目前有XCode版本8.2.1。

On my iPhone, I currently have iOS 10.3.2. 在我的iPhone上,我目前有iOS 10.3.2。

My version of XCode will not deploy to anything over iOS 10.2. 我的XCode版本无法在iOS 10.2上部署到任何版本。

On my iPhone, I am being offered an upgrade to iOS 11.0.3. 在我的iPhone上,我可以升级到iOS 11.0.3。

According to this wiki here, XCode version 9 will deploy to iOS 11.0: https://en.wikipedia.org/wiki/Xcode#9.x_series . 根据此处的Wiki,XCode版本9将部署到iOS 11.0: https : //en.wikipedia.org/wiki/Xcode#9.x_series But I can't tell whether this includes all the sub-versions, eg 11.0.3. 但是我不能确定这是否包括所有子版本,例如11.0.3。

So my question is, if I get XCode version 9 and upgrade my phone to iOS 11.0.3, will I be able to deploy to my phone from XCode? 所以我的问题是,如果我获得XCode版本9并将手机升级到iOS 11.0.3,是否可以从XCode部署到手机上? How do I tell exactly which versions of iOS are supported by each version of XCode? 我如何确切知道每个XCode版本支持哪些iOS版本? And going forward, how can I ensure that my iPhone and iPad always have versions of iOS which I am able to deploy to from XCode? 展望未来,如何确保我的iPhone和iPad始终具有可以从XCode部署到的iOS版本?

Yes, you will be able to deploy to your phone. 是的,您将能够部署到手机。

While you need Xcode 9 and not 8 to program against iOS11, this question has more to do with the Base SDK and Deployment Target settings in your project. 虽然需要Xcode 9而不是8才能针对iOS11进行编程,但此问题与项目中的Base SDK和Deployment Target设置有关。

The Base SDK is the SDK version you are compiling against. 基本SDK是要编译的SDK版本。 In Xcode 9, this could be iOS11, for example. 例如,在Xcode 9中,它可能是iOS11。 The Deployment Target setting represents the lowest supported iOS version the app will run on. 部署目标设置代表应用程序将运行的最低支持的iOS版本。 This might be iOS10, per your example, but it could be anything else. 根据您的示例,这可能是iOS10,但也可能是其他任何东西。

To use the newest iOS11 features, you'd have to have a minimum Base SDK of iOS11. 要使用最新的iOS11功能,您必须具有最低的iOS11基本SDK。 To support older platforms, you must make sure the Deployment Target is set to the oldest version you'd support. 要支持较旧的平台,必须确保将“部署目标”设置为您要支持的最旧版本。 In code, you need to check the version of the platform when deciding to use a newer-than-Deployment-Target feature. 在代码中,在决定使用比Deployment-Target更新的功能时,需要检查平台的版本。

if I get XCode version 9 and upgrade my phone to iOS 11.0.3, will I be able to deploy to my phone from XCode? 如果我获得XCode版本9并将手机升级到iOS 11.0.3,是否可以从XCode部署到手机上?

Yes. 是。 Xcode 9 and iOS 11 are both the latest (as of Oct. 2017) versions available. Xcode 9和iOS 11均为最新版本(截至2017年10月)。 If you want to support iOS 11, you need Xcode 9. 如果要支持iOS 11,则需要Xcode 9。

How do I tell exactly which versions of iOS are supported by each version of XCode? 我如何确切知道每个XCode版本支持哪些iOS版本?

Check the release notes . 查看发行说明 For example, the Xcode 9 Compatibility section says: 例如, Xcode 9兼容性部分说:

Xcode 9 includes SDKs for iOS 11, watchOS 4, macOS 10.13, and tvOS 11 Xcode 9包括适用于iOS 11,watchOS 4,macOS 10.13和tvOS 11的SDK

And going forward, how can I ensure that my iPhone and iPad always have versions of iOS which I am able to deploy to from XCode? 展望未来,如何确保我的iPhone和iPad始终具有可以从XCode部署到的iOS版本?

Staying current with the latest iOS and Xcode versions is one way to do that. 紧跟最新的iOS和Xcode版本是做到这一点的一种方法。 You don't even need the latest iOS version on your phone -- just any version that's later than the minimum version supported by whatever Xcode you're using. 您甚至不需要手机上的最新iOS版本-只需晚于所用Xcode支持的最低版本的任何版本即可。 Looking at the list of available deployment targets, I can see that Xcode 9 deploys to iOS versions back to iOS 9.1. 查看可用部署目标的列表,我可以看到Xcode 9部署回iOS 9.1的iOS版本。

Mostly, just be aware that updating iOS on your phone may require you to also update Xcode. 通常,请注意,更新手机上的iOS可能还需要更新Xcode。

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

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