Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I choose Swift compiler version

Tags:

xcode

ios

swift

I'm using Xcode 7.3 but my project is in Swift 2.1. I don't want to update my codes right now. So how can I choose or download older version of Swift compiler? Many thanks in advance!

like image 868
Lumialxk Avatar asked Mar 25 '16 02:03

Lumialxk


1 Answers

The following example is tested on Xcode 8.3 with swift 3.1

If you are using Xcode 8 you can download toolchains with needed Swift versions

1) Open this link: https://swift.org/download/#releases

2) Download Toolchain with swift version that you need. For example I have 3.1 version of swift and downloaded swift 3.0.2

enter image description here

3) Open .pkg file and install it.

enter image description here

4) Open Xcode and select in menu:

Xcode -> Toolchains -> Select Swift Version you need.

That is all folks

enter image description here

like image 181
Nikolay Shubenkov Avatar answered Oct 12 '22 15:10

Nikolay Shubenkov