How to convert Giant project Objective C to Swift

Aleem picture Aleem · Oct 23, 2018 · Viewed 9.4k times · Source

I've running project and its really gigantic, it contain almost 1000 files and 4 Custom (own built) framework and almost 10 others added via Pods. I've gone through Migrating Your Objective-C Code to Swift and also Migrate with Swiftify.

I started to converting each file one by one as Apple suggest but first Conversion isn't successfully done by Swiftify and also dependency issues.

So at this position its looks like that I start walking in Sahara Desert, where I can't see any end point.

So I need some suggestion how to convert to Swift this kinda huge scale project?

Answer

Md. Ibrahim Hassan picture Md. Ibrahim Hassan · Dec 6, 2018

I recently converted SVProgressHUD to swift using Swiftify. The converted code can be found at here.

The major takeaways would be:

  1. To start the code conversion one file at a time maintaining interoperability with Objective C, that is the converted swift file should be interoperable with your existing Objective-C code.
  2. Pick a class which does not have subclasses and is simple.

Conversion Strategy Flowchart

The detailed conversion strategy can be found here.