Is Migrating from Objective C to Swift Worth the Investment?

Md. Ibrahim Hassan
Jun 20, 2019 · 4 min read

Apple is a brand known for innovative products and is often dubbed as the “most innovative company”. Apple is successful because it creates great software to complement its hardware, and is ahead of the curve in terms of software design and user experience.

Apple’s most recent software innovation is a programming language called Swift. In 2019, of the top 110 applications on the App Store, 42% of them used Swift. Out of these if we consider the 79 non-game apps 57% of them use Swift.

How many apps use Swift in 2019?

Apple further open-sourced Swift in December of 2015, enabling the language to improve even further and get valuable contributions from the Open Source Community.

Benefits of Swift over Objective-C

Swift is the future for development in the Apple ecosystem. It is cost-effective to switch to Swift, as the development cost (salary paid to the developers) would be lower, as would the time for development and testing.

Average hourly rates of U.S. Developers working exclusively with Objective-C vs Swift (Upwork)

The average cost of maintaining a Swift project is 55% cheaper with an average saving of 39$/hour!

Moreover, tech giants like Facebook, eBay, Medium, Badoo, LinkedIn, and Google have started writing their new apps in Swift and converting their old ones to Swift.

Currently, the number of Swift repositories outnumber the Objective-C repositories for iOS and macOS.

As you can see, Swift in spite of being less than five years old has already overshadowed Objective-C (the 35-year-old giant). It is because developers love to work on Swift. As per the 2019 Stack Overflow developer survey insights, Swift is the 6th most loved language while Objective-C is the second most dreaded language (just behind VBA).

While maintaining a large project, time to time people leave the project and it becomes increasingly difficult to replace them. Newer programmers generally prefer Swift. Fast forward 5 years, the knowledgeable Objective-C programmers would be a scarce resource. [source Reddit]

Objective-C has two separate files that developers are supposed to manage. Swift is more compact and combines Objective-C implementation (.m) file and header (.h) file in one single program code file (.swift).

Lines of code comparison for similar projects written in Objective-C vs Swift:

Migration to Swift

The migration to Swift from Objective-C consists of two phases:

  1. Syntactic conversion from Objective-C to Swift
  2. Adopting new features that are introduced in Swift

Swiftify is the best solution available to convert the Objective-C syntax to Swift. It is instantaneous and the conversion results are very reliable. Swiftify automates the redundant task of converting your Objective-C code to Swift so that your developers can focus on other creative and intellectual work.

We have thousands of happy subscribers. Don’t take our word for it — check out our reviews:

Our experience

At Swiftify, we also provide professional project conversion services where we convert the project for you, adopting the new features introduced in Swift, fixing any possible runtime issues, along with testing and acceptance. Our data suggest that the average speed of source code conversion is 25 KB per hour.
Going by this rate, the time for conversion for some of the famous open-source Objective-C repositories to Swift including testing and would be:

Out of these, we converted SVProgressHUD to Swift, documenting the entire process here. We also added new features to the library and the actual conversion including testing and fixing issues took 30 hours.

Conclusion

According to the response of this developer, whose team converted an Objective-C project with 100,000 LOC to Swift manually, the conversion kept the team engaged for 6 months.

Time and cost savings when using Swiftify vs migrating manually for the above-mentioned project

From the above comparision we see that the when using Swiftify there is a saving of 3,000 hours of development time, and $200,000 in terms of development cost.

Did you already migrate your project? Don’t hesitate to share your experience, what tools and approach you used, and how long it took?

Swiftify

Swiftify.com

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store