Converting Your Project to Swift with Swiftify’s Advanced Project Converter

Jan 25, 2018 · 4 min read

Swiftify provides multiple options for converting Objective-C to Swift, but the new Advanced Project Converter (included in Swiftify for Xcode) is the easiest. The Advanced Project Converter lets you convert individual files, groups of files, or entire projects with a desktop UI that is easy to use.

The Advantages

The Advanced Project Converter is a desktop application that handles more than just converting blocks of code. You can:

  • Explore your entire project like in Xcode;
  • Select groups of files to convert;
  • Automatically add newly generated Swift files to the project file;
  • Automatically generate the Objective-C bridging header.

Getting Started

The Advanced Project Converter comes bundled with Swiftify for Xcode. You can download it here.

Note that the Advanced Project Converter only works on the Swiftify Unlimited plan. You can see the different plan options for Swiftify here.

To start, you’ll need to enter an API Key. You can get yours from the Swiftify Apps page. Your API Key will give you access to all the features of your plan.

Next, choose Open Project Folder. In the file dialog, navigate to your chosen project and select Open.

You’ll be presented with a view of your entire project, much like that of an IDE.

Browsing your project with the Advanced Project Converter

Everything here works at the project level rather than the file level. This means that converting a class will modify the project file as well.

Converting Objective-C Classes to Swift

The Advanced Project Converter lets you easily convert multiple classes and automatically integrate them back into the project. Converting groups of related classes at the same time lets you avoid breaking references between them. You don’t have to worry about Objective-C code incorrectly referencing classes that have been converted because you can convert those classes at the same time.

In our example project, the NetworkingService and ViewController classes are used together, so we’ll convert them at the same time. Select the checkbox to the left of either ViewController.h or ViewController.m, and then the checkbox to the left of either NetworkingService.h or NetworkingService.m.

Hit the Convert button (the “Play” triangle) at the top left to start the conversion. When it’s finished, your project should look like this:

Conversion successful!

In the left pane, you can see the newly created ViewController.swift and NetworkingService.swift. The old Objective-C classes are still there for you to delete at your own discretion. When you’re ready to delete the Objective-C class, just right-click on it and choose Move To Trash.

In the right pane, you can see the new Swift class and make any tweaks that are necessary.

The project file has also been updated to remove the Objective-C classes that you converted and to include the new Swift equivalents.

The full conversion process is shown here:

Build the Project

To open the project in Xcode, just double-click the project file (alternatively, right-click on the project file and choose Open in Xcode).

You can follow the tips from our Migrating Your Objective-C Project to Swift post to guide you in updating all of the references to your converted classes. When you’re ready, build the project in Xcode.

Finishing the Conversion

Now that the project is compiling correctly with your newly converted Swift code, you can repeat the process by switching back to the Advanced Project Converter, converting more classes, and testing the project again.

An Effortless Conversion Tool

Using the Advanced Project Converter to work at the project level streamlines the process of converting Objective-C to Swift. It’s easy to get a birds-eye view of your whole project and to convert many files at once.

Take a look at the Swiftify Advanced plan and download Swiftify for Xcode from the Mac App Store to give it a try.

For more guidance, read our post on migrating from Objective-C to Swift, and please share your questions in the comments below.


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