How I’d Learn iOS Development
From time to time, people ask me how to learn iOS development. So here we go.
Before you start, be serious about your end-goal. Are you trying to prototype a concept, get funding, and then hire someone else to deal with it? Are you a “generalist” who needs to get up to speed really fast. I’ve got good news: I’ve seen people ship apps in only a few weeks.
But my advice isn’t about optimizing for your first project. I’m thinking more about the long haul. You already know how to program, and you’re ready to invest a good chunk of time mastering iOS development.
Step 1: Pick Something to Build for Yourself
Maybe I’m wired different, but can’t just read a textbook. I need context and practice.
When I’m learning a language, I need a scratchpad for reinforcement. I found Playgrounds invaluable when learning Swift.
For learning iOS from top to bottom, come up with a small app that scratches an itch. If it motives you, it could be a todo list, meditation app, or a weather checker. I’d lean toward something more personal. Hey, maybe an app to help your parents’ business?
Step 2: Study the Languages
Before you understand the platform, know the languages inside and out. Yes, languages is plural.
While Swift has reached critical mass, there’s a whole lot of Objective-C code out there. You don’t need to master every detail of the language, but you should be able to read it. I used to teach Objective-C to engineers in a day. It’s a small language.
Objective-C: Apple has a free guide, which gets the job done.
Can’t I use [favorite language]?
Most of your time is going to be spent learning Apple’s frameworks, not syntax. The code samples for these frameworks will be in Swift, so you need to learn Swift anyway.
Step 3: Read Apple’s Guides
There is no shortage of third-party books and tutorials and screencasts about iOS development. Some are good, some are bad, and too many are trying to sell you on something you don’t need. The ultimate authority is Apple, and they give away outstanding free content.
Read Start Developing iOS Apps With Swift. Then read every guide in “Where to Go from Here.” Then, if you want to hear a topic phrased differently, browse the WWDC videos. Then, if you want to go in-depth, read the docs.
If Apple’s docs are a little too dry, sites like NSHipster covers many beginner topics with a more casual tone. Sites like RayWenderlich.com cover content in a tutorial format. Objc.io has great in-depth writing, but it’s probably too advanced for you right now.
There are times when third-party authors disagree with Apple. Try Apple’s way, for now.
Step 4: Stop reading. Just build your app.
You’ve absorbed everything Apple has given you? You can tell me what MVC is? What a UIView does? You know how to Google when you get stuck?You’ve got everything you need. Go build your app.
Seriously. Just go build it.
You hit a point where you’re like, “How do I change the background color of a view?” The first search result will be Stack Overflow, of course. Verify it with the documentation on UIView.
Once you go beyond high level concepts, and into “How do I actually do X,” it’s all Googling. Ask any developer how to write a custom transition animation between two view controllers. The answer: “I google it.”
It’s tempting to think you can master something by just reading just one more blog post or watching one more video. Nope. You probably understand the basics. You reach the next level through trial and error.
What about this stuff about MVVM/VIPER/FRP?
If you read too much before building, and stray too far from Apple, you’ll read about different iOS architectures. These try to solve problems you don’t understand yet. These were invented by third-parties, so Apple does not endorse them.
Build an app using Apple’s boring architecture, MVC. After you’ve done that for a while, go back and then take a look at those architectures. I don’t use them, but hey, maybe you’ll find value in them.
But what about package managers and build tools?!
An argument could be made that you should immediately learn about Carthage and CocoaPods, which are third-party tools for managing dependencies. Or Fastlane, which promises to automate complex build tasks.
When you stray from Apple’s supported toolchain, things get fragile, since they rely on unsupported APIs. On some projects, the time these tools save might be worth the occasional breakage.
But given so many teams avoid these tools because of their headaches, I wouldn’t consider them essential. Quite the opposite. In my opinion, you shouldn’t use these tools until you grasp what’s going on underneath.
Step 5: Explore The Ecosystem
Apple may be an authority, but you need diverse opinions to balance out the cool-aid. Seasoned developers outside Cupertino complain about all the edge cases in Apple’s APIs, and the horrible hacks it took to work around them.
But as soon as you venture into the larger iOS ecosystem, you’ll come across arguments about Interface Builder, Core Data, Auto Layout, and plenty of other things. They’re always fueled by anecdotes and opinions, not data.
Use critical thinking. Step back and ask where the author is coming from. It only takes a few blog posts to become an authority on a subject even if the author has never shipped anything significant around it.
I’m not recommending you only listen to people who work on Facebook/Instagram/Twitter/Pinterest. These apps have very different requirements than 99% of the apps in the world. Filter their advice through the lens, “This is what you do when you have a hundred developers working on an app used by hundreds of millions of people.” They lean toward risk aversion.
At the other end of the spectrum, small consultancies have useful insights thanks to the diversity of projects they’re juggling. But sometimes they recommend new languages and frameworks before they’re stable enough for critical projects.
Use critical thinking, especially on people with a lot of followers.
Steps 6 to ∞: Build a Different App
You just finished a Todo List app? Great. Now work on something different, like a Photo Filter app, so you’ll learn about AVFoundation. When you’ve got that done, build something that requires maps, and you’ll learn about the GPS and MapKit.
I started in Cocoa development ten years ago, on the Mac, and I’m still learning new things. The only secret is to find new ways to challenge yourself.