Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to switch an XCode project to use Swift version 1.2 in the XCode 7 beta?

Tags:

swift

Given that Swift version 2 breaks some of the apis - is it possible to select which version the compiler targets?

like image 691
Hans Sjunnesson Avatar asked Jun 20 '15 07:06

Hans Sjunnesson


1 Answers

It is not possible to select which version the compiler targets. If you want to use swift 1.2 then don't use xcode 7, stick to xcode 6.3

In case you want to use xcode 7, then you can migrate all your previous code to Swift 2 by going to Edit > Convert > To Latest Swift Syntax, it will help find many of the changes. However, you will still need to do a lot of manual editing.

I strongly recommend that you keep a backup of your project before migrating.

like image 93
Ankit Goel Avatar answered Oct 07 '22 15:10

Ankit Goel