So you want to build your first iOS app? Should you learn Objective-C or Swift?

As you may all know, the rise of the internet of things, wearable technologies and the impact of smartphones addictions, pushes companies and entrepreneurs to turn their marketing strategies and product management around mobile development.

Due to the extremely high demand, mobile development has skyrocketed, and iOS developers are now more popular than ever. So you may be asking yourself the following question: “I want to jump in the golden train and make a living out of this, but which iOS language should I learn first, Objective-C or Swift?”

Well the answer is quite subjective as it is boring: It depends.

Why do you want to learn?

TL;DR: Are you seeking to get a job as an iOS Developer? Then you should start with Objective-C. Otherwise, jump straight to Swift.

Learning a new language is often related to a certain goal or out of curiosity. In this case, knowing the reasons why and how you plan to learn can help you in your decision making.

Objective-C was created back in the 1980’s, and has been around for decades in the Apple ecosystem. Swift on the other hand, was introduced by Apple in 2014. Chances are, that if you want to learn with the objective to work in an establish company, you’ll probably have to support a huge amount of code legacy written in Objective-C. Same thing if you land in a smaller team supporting a couple of apps that are already in the app store. My guts tell me that an overwhelming majority of apps currently available are written in Objective-C. And oh… “Requires 5 years+ experience in iOS development” will be hard to defend if you only have a Swift resume …

On the other hand, if you plan to build your own apps, or jump in a start-up venture, chances are that you’ll be creating a brand new code base. That looks like a great opportunity to go with Swift and be the cool kid that uses the language that many qualifies as the next main programming language on iOS, OS X, watchOS and tvOS platforms.

How do you plan to learn?

TL;DR: Taking traditional learning classes? Get ready for some Objective-C. Taking online classes or in developer conferences? Brace yourselves, Swift is coming.

Planning how you want to learn can make a big difference. More “conservative” learning solutions, like schools or mentoring services offer a wide variety of choices, but are for the most, still in Objective-C. Planning to learn on your own, online or in developer’s community gathering, will guarantee you better chances of learning what’s new on the market.

Another point to consider, is the huge amount of code available online like; demos, tutorials, snippets and plugins, all written in Objective-C. You’ll also realise that most answers online are still been written in Objective-C. But you will notice that Swift’s content is growing at a fast pace. Most notorious iOS developer blogs and online courses already switched to Swift.

Keep in mind that both languages can work nicely together by bridging Objective-C code to an existing Swift project, hence you will not be left with nothing if that “plugin you dream about” is only written in Objective-C.

Is Swift easier to learn?

I read a lot about this one and what comes out regularly is that Swift is “cleaner” than Objective-C, which I agree. The syntax is simpler and those with programming experience will easily be able to feel comfortable around it. One of the biggest advantage of Swift is the new Playground platform that helps you easily test something out, without having to write a bunch of code to get simple results. Xcode Playground is like a sandbox that helps you understand the syntax just by … well trying it! No complicated structures, no patterns required, just code and go. That’s a major step forward on your learning curve and a great way to obtain easy results.

In my humble opinion, you should definitely learn some concept pattern like MVC (Model-View-Controller) first or object oriented programming before even writing a single line of Swift code. This will greatly improve your level of comprehension not only in Swift, but in all modern programming languages. Just my 2 cents.

Don’t forget that Swift is still a toddler and is constantly evolving as we speak. Apple, by open sourcing the swift compiler, encourages developers to participate in its development, so that it continues to live from community’s contributions.

And what about cross-platform frameworks?

I hear you web developers! Yes indeed, there are other ways to develop an iOS app than using native APIs or languages like Swift or Objective-C. As a matter of fact, many options are available to you if you’re familiar with javascript or c#. Phonegap/Cordova and Xamarin are good examples of tools that have the advantage of being cross-platform (one code base for all supported mobile platform). But I still believe they are not as efficient as a real native iOS code.

React native on the other hand, a javascript framework, looks pretty promising. It seems to deliver a great native experience and even if some developers do not agree on what it can handle, reviews are pretty optimistic. We’ll have to follow this closely and it will surely be part of a next blog post.

What would I do?

Having zero knowledge whatsoever in iOS development, I would take the time to learn Objective-C before eventually switching to Swift. Objective-C is still the heart and soul of iOS. And even if I think it will someday be replaced by Swift, it still represents a great learning foundation that comes with many advantages in real life and will help you build a nice mobile developer resume!

Cheers!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.