Search code examples
iosswiftxcode11

How to migrate a code from swift 3 to swift 4 or above?


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.


Solution

  • 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