0

I have just upgraded from xcode 10.1 to xcode 11.2.1. Now whenever I open my existing project in xcode 11.2.1 which was built in swift 3.0 it shows me "Unsupported Swift Version".

Please anyone can give me a brief description about it.

Here I am sharing the screenshot.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • 1
    Does this answer your question? [How to fix "SWIFT\_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0" error in Xcode 10.2?](https://stackoverflow.com/questions/55366024/how-to-fix-swift-version-3-0-is-unsupported-supported-versions-are-4-0-4-2) – Maarten Bodewes Dec 20 '19 at 13:22
  • Try the answers from this, https://stackoverflow.com/questions/55366024/how-to-fix-swift-version-3-0-is-unsupported-supported-versions-are-4-0-4-2 – Pooja Gupta Dec 20 '19 at 13:42

3 Answers3

8

You cannot run swift 3 on Xcode 11. Download a version of XCode 10.1,You can run both.There will be option to migrate code to swift 4.

here you can download XCode 10.1:

XCode 10.1

Please check this link below. You can upgrade to swift 4.

https://medium.com/@hanif.awan2007/tips-upgrading-your-code-from-swift-3-to-swift-4-dbcba128b48b

  • I tried above steps but after that it gave a lots of code level error around more than 500 as my project is too big there are lots of files already created and out of this some files contains different kind of error. Isn't there are any other option to solved these error instead of manually solving? – Harshada Panchal Dec 23 '19 at 06:00
  • You should replace the deprecated methods with new ones.I share the link above how to fix these errors – Muhammad Awais Jamil Dec 23 '19 at 07:04
1

Go to project navigator> Build Settings. search for swift Compiler - Language and change this to desired version. See image here

Zain
  • 153
  • 9
0

You have a guide on official documentation: https://swift.org/migration-guide-swift4/

First check you build settings: enter image description here

You have an option "Swift language version" change this to swift4.

Then, try to compile and fix your warns / errors. Most of them can be automatically fixed by xcode.

If you got some pod dependencies, update it.

Geoffrey
  • 203
  • 1
  • 2
  • 9