How can I choose Swift compiler version

前端 未结 4 1122
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-11 11:40

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

4条回答
  •  不要未来只要你来
    2021-01-11 12:10

    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

    3) Open .pkg file and install it.

    4) Open Xcode and select in menu:

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

    That is all folks

提交回复
热议问题