Is Objective-C Still Relevant in 2023 or Is Swift the Only Real Choice? [UPDATED]
Table of Contents

Is Objective-C Still Relevant in 2023 or Is Swift the Only Real Choice? [UPDATED]

It’s probably easy to say that whatever end goal you would want to achieve with Objective-C you can achieve it with as well with Swift. There’s a good chance going with Swift would yield quicker results. Sure, developers may deliver apps or libraries regardless of whether the chosen language is Swift or Objective-C. After giving it some thought, however, we can’t come up with an edge case that would make the decision leaning toward using Objective-C for iOS mobile application development.

Disclaimer: we’re assuming you are a company that doesn’t only hire developers with Objective-C knowledge at their disposal.

We know our initial thoughts are rather harsh towards Objective-C. We’d like to point out that our developers mostly loved programming in Objective-C and still love it for its power to deliver products. Furthermore, Objective-C is a piece of art, creators packed genius solutions and were constantly improving it, so us developers were able to use it at our advantage.

There are a lot of indicators telling us there’s still a ton of legacy Objective-C code, both from Apple and from other developers, that’s still in use. Looking at some statistics from the StackOverflow 2021 survey, we see that 5.1% of respondents use Swift, whereas 2.8% use Objective-C, making it an approximate 2:1 ratio. Don’t get us wrong, probably if you look hard enough, you’ll still find demand for Objective-C development (probably maintenance is a more suited word here).

Nevertheless, in the newest Stack Overflow survey, turns out ~63% of people loved working with Swift, while only 23% of people said the same about Objective-C. Which means that more than 75% of developers working with the language dread working with it!

Let’s look at some numbers.  

Number of Developers

When looking at number of developers skilled either in Swift or Objective-C (or both), we managed to find some statistics from JetBrains (2021) showing that out of all developers participating in their survey, 76% of developers are skilled in Swift, 13% are skilled both in Swift and Objective-C, whereas 11% are only skilled in Objective-C. The statistics are pretty self-explanatory.

Number of StackOverflow Tickets

On StackOverflow, the library of knowledge for all developers, Swift has overtaken Objective-C in both total questions asked (316.604 vs. 292.479) and number of questions asked per week (481 vs. 39).

Popularity of a Language

The PYPL PopularitY of Programming Language Index is created by analyzing how often language tutorials are sought on Google. The more a language tutorial is searched, the more popular the language is assumed to be. In 2023, both Swift and Objective-C get a similar share of Google searches, though the newer language is somewhat more popular (2.28 % for Swift vs. 2.26% for Objective-C).

What we’d like to point out at this point is that we should not be blindly looking at numbers, but instead try to understand where those numbers come from. The creators of the PYPL Popularity Index say, “The more a language tutorial is searched, the more popular the language is assumed to be. It is a leading indicator.

The raw data comes from Google Trends. This index is created by analyzing how often language tutorials are searched on Google. But instead of “Objective-C tutorials” a phrase “iOS tutorials” is used. Nowadays, we could say for some historical reasons. But the key takeaway here is that anyone searching for “iOS tutorials” will probably land on a tutorial based on Swift.

It’s easy to see how such numbers can be very misleading and give a wrong impression of equal popularity among Swift and Objective-C for native iOS app development.

Importing Frameworks From Other Languages – Swift Has You Covered

There’s one task that just recently would still require Objective-C to be used alongside Swift in a project to develop a native mobile app. Till recently, if you wanted to use an e.g. Rust or C++ library in a Swift project, you were required to use Objective-C with bridging headers to act as intermediate language that would serve as connection from Swift to your chosen framework in the other language.

Now you don’t need Objective-C anymore. When libraries are correctly set up, you can import, e.g. Rust, and use it in your app.


Swift Objective-C

First Appearance

2014

1984
Paradigm
Multi-paradigm Imperative, Object-Oriented
OS iOS, iPadOS, macOS watchOS, tvOS, Ubuntu, CentOS, Amazon Linux, Windows Cross-platform (but rarely seen on non-Apple platforms)
Influenced by Objective-C, Python, Go, JavaScript, and countless others Smalltalk, C
Type System Static Dynamic
Source Code Open Source Proprietary
Is It Actively Developed? Yes No

Did we mention, there are Swift exclusive features?

This category of comparison might be most biased or just based on opinion, but the only technology coming to our minds that’s based exclusively on Objective-C is perhaps if you wanted to use a slightly modified version of an Objective-C framework. As we know, today, it’s easy to import an Objective-C framework in a Swift project. Perhaps, however, you would need that Objective-C framework to behave slightly different, in such a way, so that it would make sense to just modify the framework and then import it in Swift, rather than making workarounds in Swift to achieve the same goal.

It's the one, and only, thing that would count as an exclusive for Objective-C.

On the other hand, there are many language features that you can take advantage of only by using Swift. Let’s list a few: SPM, SwiftUI, WidgetKit, Combine, async/await, property wrappers, enums with associated values… In today’s terms those represent the state-of-the-art for modern iOS development, which btw. has most developers engaged with regarding developers developing on Apple products (macOS, iPadOS, tvOS, watchOS).

SPM - The Swift Package Manager

Per swift.org, “The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.”

SPM is included in Swift 3.0 and above. Although it was released with some shortcomings (e.g. dealing with binary frameworks) by now it’s vastly improved. We can say that it’s a standard for dependency management with Swift projects, now. Helping in that is the fact that developers who maintain open-source repositories in great extent added the ability to import their framework with SPM.

Carthage and CocoaPods

As for the other dependency management tools, namely Carthage and CocoaPods, we can be short and say that both allow equal workflows for both iOS and Objective-C based projects. So those tools don’t make a difference in consideration to a programming language.

Conclusion

It could have been better to position this chapter at the top of the article with a “TLDR: no-brainer, Swift is the way to go” declaration. If you’ll see some fancy statistics making Objective-C score surprisingly high (popularity, usage in new projects, etc.) be suspicious – Objective-C is still among us only for legacy reasons, only. We at ITMAGINATION have a long time embraced Swift for native iOS mobile app development and are ready to work together with your team on your next adventure.

Liked the article? subscribe to updates!
360° IT Check is a weekly publication where we bring you the latest and greatest in the world of tech. We cover topics like emerging technologies & frameworks, news about innovative startups, and other topics which affect the world of tech directly or indirectly.

Like what you’re reading? Make sure to subscribe to our weekly newsletter!
Relevant Expertise:
No items found.
Share

Subscribe for periodic tech i

By filling in the above fields and clicking “Subscribe”, you agree to the processing by ITMAGINATION of your personal data contained in the above form for the purposes of sending you messages in the form of newsletter subscription, in accordance with our Privacy Policy.
Thank you! Your submission has been received!
We will send you at most one email per week with our latest tech news and insights.

In the meantime, feel free to explore this page or our Resources page for eBooks, technical guides, GitHub Demos, and more!
Oops! Something went wrong while submitting the form.

Related articles

Our Partners & Certifications
© 2024 ITMAGINATION, A Virtusa Company. All Rights Reserved.