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?

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).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.