Swift 1.2 to deploy on iOS 7 and above

Hi everyone


I m new to IOS development and really excited about it.

I m interested to make an app and all the tutorials and frameworks that I m referring to is based on Swift 1.2

I would like to deploy my app to all IOS 7 and above. Is it necessary to upgrade all my code to Swift 2 or continue with Swift 1.2?


And also if the xcode 7 becomes official, do we need to upgrade all code to Swift 2?


Thank you

Answered by Mr Bug in 44968022

Hi gvimlan,


From XCode 7 onwards if you use Swift it has to be Swift 2.


I'm 90% sure you'll still be able to use XCode 6 (and therfore Swift 1.2) for a while, until Apple makes draws a line in the sand stopping that.
However you wont be able to use any iOS9 only features until you upgrade to XCode 7.


That said, I recently changed a very large project from Swift 1.2 to Swift 2 - using both the auto-upgrader and manul changes, and it took about 4 hours in total. A large amount of time, but probably pretty insignificant in the grand scheme of things.

The main thing you'll find if you use Swift 1.2 examples in Swift 2 are :

* 1.2 code that references to UIKit, SpriteKit etc may do some casts that are unncessary using the latest Swift friendly header files found in XCode 7.

* A few renamed methods (where XCode will tell you what the new name of the method is)

Accepted Answer

Hi gvimlan,


From XCode 7 onwards if you use Swift it has to be Swift 2.


I'm 90% sure you'll still be able to use XCode 6 (and therfore Swift 1.2) for a while, until Apple makes draws a line in the sand stopping that.
However you wont be able to use any iOS9 only features until you upgrade to XCode 7.


That said, I recently changed a very large project from Swift 1.2 to Swift 2 - using both the auto-upgrader and manul changes, and it took about 4 hours in total. A large amount of time, but probably pretty insignificant in the grand scheme of things.

The main thing you'll find if you use Swift 1.2 examples in Swift 2 are :

* 1.2 code that references to UIKit, SpriteKit etc may do some casts that are unncessary using the latest Swift friendly header files found in XCode 7.

* A few renamed methods (where XCode will tell you what the new name of the method is)

Hey man


Thank you for the reply. The only problem I m facing is the framework thats being used. Its only supporting swift 1.2 right now. And I m having trouble as I m trying to use XCode 7 beta to create the project.

I guess I shall find alternative framework and move on with swift 2.


🙂

Swift 1.2 to deploy on iOS 7 and above
 
 
Q