Swift 3 iOS 兼容性 [英] Swift 3 iOS compatibility
问题描述
我是 Apple 开发的新手,很快我将通过 AppStore 分发我的应用程序.所以现在我使用 Swift 3 并且默认情况下部署目标设置为 iOS 10.0 这意味着我将无法让它在例如 iOS 8-9 上运行?' Swift 3 中的 Cos 我使用了在以后的操作系统中不可用的新函数
I'm new to Apple developing and soon I will distribute my app via AppStore. So now I'm using Swift 3 and by default the deployment target is set to iOS 10.0 It means that I won't be able to make it run for example on iOS 8-9? 'Cos in Swift 3 I use new funcs which are not available in later OS
推荐答案
您可以让您的应用在 iOS 8 上运行 &9 通过将部署目标设置为这些版本之一.Swift 3.x 与 iOS 8 和更新版本兼容(我不确定,但它可能也与 iOS 7 兼容).与 Swift 2.2 的唯一区别(关于系统要求)是您必须使用 Xcode 8.
You can make your app run on iOS 8 & 9 by setting the Deployment Target to one of these versions. Swift 3.x is compatible with iOS 8 and newer (I'm not sure, but it might be also compatible with iOS 7). The only difference to Swift 2.2 (regarding the system requirements) is that you have to use Xcode 8.
当您将部署目标设置为比 iOS 10 更早的版本时,您应该意识到您不能使用 iOS 10 中的新 API.(除非您使用 #available
运算符)但使用 Swift 3 应该没问题.
When you set your Deployment Target to an earlier version than iOS 10, you should be aware that you cannot use APIs that are new in iOS 10. (except you use the #available
operator) But using Swift 3 should be no problem.
您现在可以使用 Xcode 8.0 GM 上传以 Swift 3 编写的应用
You can now upload apps written in Swift 3 using Xcode 8.0 GM
这篇关于Swift 3 iOS 兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!