Learn how to build an iPhone or iPad app – For Free

One of the best things you can teach yourself during this quarantine period is how to code.

Learning to develop an iOS app using the Swift programming language is probably not the first or easiest thing that comes to mind when one wants to learn how to code. You might have heard things like “Python is great for beginners” or “Start with HTML, CSS and Javascript”. 

In 2020, I would argue that learning Swift to build an iOS app is better in the long run because:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

Fret not.

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.

https://www.hackingwithswift.com/100/swiftui

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?

https://cs193p.sites.stanford.edu

(🤔 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.

https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html

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.

https://www.swiftbysundell.com

BLCKBRDS

Probably the best free resource for polishing your UI on the SwiftUI Framework.

https://blckbirds.com

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.

https://goshdarnswiftui.com

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.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.