Convert swift 2 to swift 4

I'm trying to convert swift 2 to swift 4 but macOS mojave 10.14 isn't letting me open xcode 8. Any ideas on other ways to convert?


the error is :

Xcode 8 cannot be opened because of a problem.

Check with developer to make sure Xcode 8 works with this version of macOS. You may need to reinstall the application. Be sure to install any available updates for the application and macOS.

Replies

As you already have learnt in another thread and the error message is clearly stating, Xcode 8 does not run on Mojave.


Your options:


- Get a Mac with High Sirra (or some older macOS which runs Xcode 8)

- Get an external HDD and install High Sirra on it (you should check whether your Mac can boot High Sierra from the HDD)

- Migrate your project to Swift 3.3+ manually

(Swift 2 to 3 migration is very difficult even when using migrator. If your project is big enough as an App Store app, it may be very hard...)


It has been very long since Apple announced that Xcode 8 was the last Xcode which supports Swift 2,

you are too late to migrate your project to make it in a usual effort.

For small projects, I open them in XCode10 and convert manually, as suggested.

That may be a bit tedious, though better than nothing !

Your options:

One more option:

Install 10.13 is a virtual machine.

I find this very convenient because I don’t have to get a second Mac, or boot my main Mac from a different drive. Mac-on-Mac virtualisation isn’t appropriate in all situations — for example, it’s terrible for anything that needs high-speed graphics — but it works really well for this sort of thing.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I've tried installing Sierra on to an HDD, but mojave won't let me install it. So the only way is to convert it manually. Is there any other software/applications that can help me convert it since it's quite a big project?

As far as I know, no.


Have you tried High Sierra?

Anyway, it might be easier for you to find how to install Sierra/High Sierra onto an external HDD.


And as I noted before, it is very difficult to migrate Swift 2 to Swift 3, even if you use the migrator in Xcode 8.

Schedule enough time for it.

This is why we are moving away from Xcode; The design of Xcode is not backward compliant and you need to keep many MACs for legacy reasons and need to keep buying new MACs so that latest OS would run.....

What's the different between Swift 2 and Swift 5? To be honest, I don't see any....

I'm using Flut ter nowadays and automate deployment using a free service called fastlane.tools for output to iOS; save myself a lot of headache and time....

Time to put Xcode in the bin.

Add a Comment