Swift 2.0 minimum system version requirement (deployment target)

11,249

Solution 1

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.

Solution 2

I've tested it as far a iOS 7, no clue on anything lower however you probably shouldn't be supporting iOS 6 anymore.

Solution 3

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.

Share:
11,249
CarmeloS
Author by

CarmeloS

iOS developer in Tencent

Updated on July 08, 2022

Comments

  • CarmeloS
    CarmeloS almost 2 years

    So Swift 2.0 is coming up with Xcode 7, what is the minimum iOS / OS X system version required to use Swift 2.0?

  • Andrey Tarantsov
    Andrey Tarantsov almost 9 years
    It very very very likely won't run on iOS 6 because Swift 1 didn't run on iOS 6.
  • Brian Birtle
    Brian Birtle over 8 years
    Has anyone actually tried this with iOS 7? I upgraded to Yosemite and the simulator doesn't work for iOS 7 (other slightly related thread). But can you attack an iPhone 4 by USB and debug like that? Can you deploy to the App Store?
  • Joshua Nozzi
    Joshua Nozzi over 8 years
    It's not that Swift isn't supported on iOS 7; it's that Apple doesn't want to allow new App Store submissions targeting outdated versions of their OS. Not only can you not submit to the App Store but the latest versions of the tools themselves don't include some of the necessary support.