Swift 3 to 5 conversion / apple silicon MacBook

Hi all,

I am in need of converting old swift 3 application to swift 5 - it is to be slightly updated & posted to Appstore. Following the guidelines, I have to install Xcode 10.1, migrate to swift 4, then I have to upgrade to more recent Xcode ver and repeat the same from swift 4 to swift 5. Given that Xcode 10.1 is not running on Big Sur, I have to either use virtual machine, or downgrade my OS to somewhat Sierra version (whatever it is exactly).

And here comes my issue - as soon as I am using M1 MacBook, I can't do both. There are no VMs supporting installation of older MacOS for M1 mac (at least, none I am aware of), and also M1 mac will not run any MacOS version but Big Sur.

What can I do from here? Are there any tools to migrate (apple or third-party, whatever)?

In the worst case, I'm fine with just trying to build my app as is from my swift 3 source code and trying to post it to Appstore, but again, recent Xcode does not allow me to do so. Would it be an option to set up ARM Linux/Windows VM and use some command line build tools? Or, do we have any MacOS command line tools to build swift 3 project?

Any help is really appreciated! Andrey

Why don't you simply update the Swift syntax and project manually?

Accepted Answer

I understand the pain, even though compiler helps a lot in fixing. Note that Xcode message to use Xcode 10.1 is misleading. No need to use older Xcode to convert.

You can do it directly in XCode 12 or Xcode 13.

See my detailed explanation here: https://developer.apple.com/forums/thread/686256

Swift 3 to 5 conversion / apple silicon MacBook
 
 
Q