Swift 3 iOS兼容性 [英] Swift 3 iOS compatibility

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

问题描述

我是Apple的新手,很快我将通过AppStore分发我的应用程序。所以现在我正在使用Swift 3,默认情况下,部署目标设置为iOS 10.0这意味着我无法在iOS 8-9上运行它? 'Cos in Swift 3我使用了以后操作系统中没有的新功能

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 operator)但是使用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屋!

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