简体   繁体   中英

Swift 2.0 minimum system version requirement (deployment target)

所以Swift 2.0即将推出Xcode 7,使用Swift 2.0所需的最低iOS / OS X系统版本是什么?

An Apple staffer had this to say :

iOS 7 / OS X 10.9, same as Swift 1.0.

Update: I'm guessing this is because the runtime is packaged into the built app / library / framework / whatever the same as with Swift 1.x.

我已经测试了它到iOS 7,没有任何线索,但你可能不应该再支持iOS 6了。

I couldn't find an official response anywhere, but they implied that Swift 2.0 will deploy back to iOS 7 in a couple of WWDC 2015 presentations.

  1. Session 403: Improving Your Existing Apps with Swift ( http://asciiwwdc.com/2015/sessions/403 ), where they mention the availability feature in Swift 2.0:

Because they all want you to support these old versions, iOS 7, 8, and now 9 is probably going to be on slate for this fall for many of you.

So to do that, we have this new availability feature introduced in Swift 2.0.

So as long as you are writing some code in Swift 2.0, we have a great way to check to see what SDK you are on and if you can actually use this feature or not.

  1. Session 411: Swift in Practice ( http://asciiwwdc.com/2015/sessions/411 ), where they talk about the Swift 2.0 availability feature:

But if I slide all the way back to deploying to iOS 7, the compiler can see, just as we can read on this slide, that it's unsafe to use this method, request when in use authorization. And the compiler will tell you that this is just unsafe code. And it's an error. It will literally prevent you from building this code. And it will give you a nice safety check.

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