One of the best things you can teach yourself during this quarantine period is how to code.
In 2020, I would argue that learning Swift to build an iOS app is better in the long run because:
You can start building (and even shipping) complete apps at an early stage. Learning how to code properly is a marathon, not a sprint. In a marathon, making a tangible app that you and your friends/family can use will serve as a powerful motivator to go further. Try shipping something that your family members can use with Python.
Swift – the modern programming language announced in 2014 has recently replaced Objective-C as the de facto language for iOS/macOS development. Many new frameworks such as RealityKit are Swift only. This means you’ll be learning how to code in a language that is future-proof.
You get to play with fun, state-of-the-art stuff like AR (Augmented Reality) programming. Apple’s (usually) excellent APIs (Application Programming Interfaces) make it easy and fun to build apps that might seem “high-tech” to most people.
When you eventually decide to ship an app, you just have to pay the Apple Developer Membership fee to distribute it on the App Store. No setting up of servers (unless your app has a subscription) and boring back end development needed.
Anyway, this guide assumes that you have already access to a Mac capable of running macOS Catalina and an iOS device capable of running iOS 13. Aside from those, here’s how you can get started for free:
If you’re completely new to programming
So you don’t know what data structures and algorithms are, or what the difference between a reference type or a value type is. Maybe you don’t even know what a for loop does.
Paul Hudson’s excellent 100 days with SwiftUI will cover the fundamentals, and then through the fundamentals of SwiftUI and other patterns that you need to know to develop an iOS app.
If you’re already or somewhat familiar with Object Oriented Programming
Ah, so you got a degree or diploma where you had to learn Data Structures and Algorithms, but probably got a cushy bank job that didn’t require you to use those skills for the past decade?
After a long wait, Stanford is finally releasing its updated CS193P course online – this time completely based on SwiftUI. I’ve personally gone through this course twice, once in 2010 when I was building an iPhone app as part of my dissertation, and another in 2018 when I was learning how to build Yujo.
This course is usually a tough one (the Spring 2020 one is still underway so I can’t really tell if it’s as difficult), but will throw you into the deep end of the pool and get you well-acquainted with design patterns such as delegates and protocols.
Oh, and the instructor, Paul Haggerton is probably one of the best teachers I’ve learned from. He also worked with Steve Jobs back at NeXT, how’s that for street cred?
(🤔 coincidence that both excellent iOS dev teachers are named Paul?).
Other excellent resources to supplement your learning
Official Swift Documentation
Read this for an understanding of Swift’s syntax. I found the official Swift documentation to be very pleasant to read compared to the documentation for other programming languages.
It’s actually a required reading for CS 193P, so I would urge you to read it from cover to cover once you have a grasp of the fundamentals of programming.
Swift By Sundell
John Sundell’s weekly articles give excellent tips on getting the most out of the Swift programming language. Sundell is focused more around mastery of Swift itself, rather than the iOS development APIs.
Probably the best free resource for polishing your UI on the SwiftUI Framework.
Gosh Darn SwiftUI (or F*cking SwiftUI)
Excellent cheat sheet for SwiftUI’s components, how they map to UIKit and some examples on how to use them.
Conclusion – There’s never been a better time to start
2020 is probably the best time to start learning how to develop apps for iOS devices. The massive shift towards the declarative programming paradigm with SwiftUI and Combine has begun and we’re far away enough from WWDC 2019 to have most bugs resolved. SwiftUI is still in its infancy (there is no component for multiline text entry for example), but all of us are expecting some big enhancements to be announced in WWDC 2020 in late June.
You’ll also do well to start learning before, and not after WWDC has started so you can appreciate the code examples given in the sessions better.
Just keep in mind that even though it’s a lot easier to learn iOS development in 2020, it’s still going to be a marathon, not a sprint. There are going to be times when you feel tired, overwhelmed by an API or pattern.
Don’t give up.
Software development at its core is nothing more than a series of steps that need to be taken, one at a time.