Should you choose Objective C for a new iOS app in 2019?

Alex Gorodov
QuickBlox Engineering
4 min readJul 9, 2019

Should I learn Objective C? Is there any future for Objective C? Is Objective C dead? The browser search is full of such questions which definitely indicates that the prospects of Objective C are a matter of great concern for developers. Moreover, with a swift advance of Swift (pun intended), such concerns are getting increasingly justified.

Objective C has been around for 35 years which makes it older than lots of developers now working on MacOS and iOS software. Swift, in its turn was first released in 2014 but is quickly gaining ground and seems to squeeze Objective C out of the market. Observations show that almost half of the top apps in the App Store are written in Swift, and we can say that it is quite a decent progress in only five years.

Now, the million-dollar question is whether developers should consider Objective C when they take on a new iOS project or choose Swift right from the start. Let’s see what the current situation of Objective C is.

First, nobody has ever heard an official statement by Apple about discontinuation of Objective C support or even a tentative date when it might go out of use. There are lots of code written in Objective C that is still being maintained and lots of popular apps that use this language. Think of it this way — who would commit to migrating all those apps to another language just for the sake of it? Imagine the amount of labor and resources that such a project might take with no obvious benefit.

Thus, we can say that Objective C is going to stay around in the foreseeable future, and the Objective C developers who have mastered this language may rest assured that their skills will continue to be in demand. However, it is a different story with new apps and young developers choosing the language to learn.

Objective C vs. Swift at a glance

To understand whether it would be a good idea to choose Objective C as the language for your new iOS app project, let’s see how it compares to Swift and what can tip the scales in this matter.

Let’s get into a bit more detail to see how Objective C is different from Swift.

  • Objective C performs slowly due to the runtime code compilation. Swift is faster — according to an official statement by Apple, it performs 2.6 times faster than Objective C.
  • Objective C derives its code structure from C and, therefore, has a rather complex syntax with a lot of special symbols. Swift, in its turn, is almost like the plain English language which makes its learning curve easier than that of Objective C.
  • In the context of code safety, the main difference is in the way Objective C and Swift handle nil pointers. In Objective C, a nil pointer does not result in an app crash which makes it hard to detect and correct. In Swift, however, nil pointers lead to crashes that are easy to identify. On the overall, apps written in Objective C may have more hidden bugs than those where Swift was used.
  • Objective C requires maintaining two files of code that takes much more time and effort. With Swift, you only need to maintain a single code file and, thus, spend less time and manual work on this process.
  • In general, Objective C needs more lines of code than Swift.
  • Objective C does not support dynamic libraries and uses static ones instead. They are larger and affect the app performance. Swift uses dynamic libraries that reduce the overall app size and increase the performance and speed.

Should you choose Objective C?

As you can see, even a brief overview of the main features of both languages shows that Swift wins many points over Objective C. Moreover, recently one of the last advantages that Objective C still had over Swift has been removed.

Swift 5, the latest version of the language, comes with ABI stability that is a huge step towards achieving high performance and safety. Until now, the lack of ABI stability was a serious drawback for Swift, and now it has been eliminated.

With the announcement of the new version of Swift, Apple is encouraging developers to use it for new iOS apps. Well, it seems logical, as the young language has a number of distinct advantages over the older and more cumbersome Objective C.

As a conclusion, we at QuickBlox can say that while Swift may be your language of choice for building a new app, existing apps written in Objective C should stay that way, especially if you are OK with their performance. Continue maintaining them, but learning Swift may also be a good idea.

--

--