Compiling Swift 2 code

by Rahul D   Last Updated August 10, 2018 10:12 AM

I have an app which is written in Swift 2.1. Is it possible to build it in Xcode 9?

If not, how do I build it?

Tags : ios swift


Answers 1


It will not be possible to build Swift 2 code in Xcode 9. You have two options:

  1. Use the compatible version of Xcode (Xcode 7.x.x) and macOS (OS X El Capitan 10.11, or macOS Sierra 10.12) to build the app.

  2. Migrate the codebase to a more recent version of Swift (3.x or 4.x) using the migration assistant built into a recent version of Xcode. Xcode 8 can migrate your code from Swift 2 to Swift 3.

It will not be possible to build Swift 2 code with Xcode 4 as it does not support Swift 2 (doesn't have the compiler).

Nimesh Neema
Nimesh Neema
August 10, 2018 10:08 AM

Related Questions


Tab bar item shows as gray box

Updated June 02, 2015 13:05 PM




how to use dict inside a plist

Updated July 25, 2016 08:05 AM