Swift 2.3会与iOS 10兼容吗? [英] Would Swift 2.3 be compatible with iOS 10?

查看:106
本文介绍了Swift 2.3会与iOS 10兼容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是iOS dev和Swift的新手。

I'm new to iOS dev and Swift.

我使用Swift 2.3开始游戏。将它发送给Apple预览,他们昨天拒绝了它,因为一些功能无法在iOS 10上运行。所以我不得不将我的iPhone 6S更新到iOS 10,以便相应地进行测试。

I started my game using Swift 2.3. Sent it for Preview to Apple, they rejected it yesterday because a few functionalities were not working on iOS 10. So I had to update my iPhone 6S to iOS 10 in order to test it accordingly.

当这样做时,我的XCode 7显然要求我更新,否则我无法再在iOS 10上安装我的游戏。我做了。

When doing that, my XCode 7 obviously requested me to update otherwise I couldn't install my game back again on iOS 10. Which I did.

安装XCode 8时,建议我迁移到Swift 3(推荐)。这是我可以选择的最糟糕的选择,因为现在我的代码有超过240个错误,包括来自第三方库(如GoogleAds,iCarousel等)的语法错误。如果它们都是我的,那么修复这些错误就不会有任何问题。

When installing XCode 8, suggested me to migrate to Swift 3 (recommended). That was the worst choice I could ever pick since now my code has more than 240 errors including syntax ones from 3rd party libraries such as GoogleAds, iCarousel, etc. I wouldn't have any problem on fixing those 240 errors if they were all mine.

所以我的问题是,我可以在我的XCode 8上回到Swift 2.3并仍在iOS 10上运行吗?

So my question is, can I go back to Swift 2.3 on my XCode 8 and still run it on iOS 10?

另外,他们告诉我我的应用程序在iPad上看起来并不好,因为即使我不支持它,它也应该可以播放。这是一个简单的修复,但现在iOS 10不再支持iPad 2,也不支持iPhone 4& 4S。从iPhone 5开始5s + iPad Air 2.

Also, they told me my app didn't look "good" on iPad since even though I don't support it, it should be playable either way. That was an easy fix but, now iOS 10 doesn't support iPad 2 anymore nor iPhone 4 & 4s. Starts from iPhone 5 & 5s + iPad Air 2.

我现在应该忘记那些旧设备(iPhone 4和iPad 2)吗?

Should I forget about those old devices now (iPhone 4 and iPad 2) ?

提前致谢。

推荐答案

Swift语言的版本与目标操作系统无关。

The version of the Swift language is not related to the targeted OS.

使用Xcode 8,您可以使用Swift 2.3或Swift 3 - 两者都能够针对各种iOS版本,所以是的,您可以在Xcode 8中使用Swift 2.3编写iOS 10代码。

With Xcode 8, you can use either Swift 2.3 or Swift 3 - both are able to target various iOS version, so yes, you can code for iOS 10 with Swift 2.3 in Xcode 8.

你说:


那么我应该支持的设备呢?自iPhone 4& 4s / iPad 2在模拟器列表中不再可选。

Now what about the devices i should be supporting? since iPhone 4 & 4s / iPad 2 are no longer "selectable" in the simulator list.

当您定位iOS 10时,这些设备无法选择,因为它们不支持此操作系统。

Those devices are not selectable when you target iOS 10 because they don't support this OS.

因此,如果您只针对iOS 10,那么您不必支持它们。但是要小心,如果你的目标是iOS 10和iOS 9或更低,你必须支持它们!

So if you only target iOS 10 indeed you don't have to support them. But be careful, if you target iOS 10 and iOS 9 or lower, you will have to support them!

当你定位iOS 10时,你的应用程序将适用于iOS 10 - 如果你的目标是iOS 9,你的应用程序将适用于iOS 9和10,如果你的目标是iOS 8,它将适用于iOS 8,9和10.等等。

When you target iOS 10, your app will work with iOS 10 - if you target iOS 9, your app will work with iOS 9 and 10, if you target iOS 8 it will work with iOS 8, 9 and 10. Etc.

这篇关于Swift 2.3会与iOS 10兼容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆