How I Learned to Build Apps

From time to time, people ask me how to learn iOS development. So here we go.

Before you start, be serious about your 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 to master iOS development.

Step 1: Pick a Personal Project

Maybe I'm wired different, but can't just read a textbook. I need context and practice.

When I learn 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. Whatever motives you, be it 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, are mountains of valuable Objective-C code 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.

Swift: Read Apple's Swift Programming Language book. If you want a quick introduction, watch Getting Started with Swift, from Apple's annual developer conference, WWDC.

Objective-C: Apple's free guide gets the job done.

"Can't I use [favorite language]?"

There are third-party tools to build apps in JavaScript, C#, whatever. Avoid them like the plague. Most iPhone apps use Swift and Objective-C. Apple's toolchains are optimized for these languages. When your alternative language breaks for mysterious reasons – and it will – you're on your own.

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, tutorials, and screencasts about Swift. Some are good, some are bad, and too many are selling 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 cover beginner topics in a 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.

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. They're tell you, "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 understand the basics. You reach the next level through trial and error.

"What about this stuff about VIPER or Clean Code?"

If you read too much before building, and stray too far from Apple, you go down rabbit holes about different iOS architectures. These try to solve problems you don't understand yet. These were invented by third-parties, so Apple doesn't endorse them.

Build an app using Apple's boring architecture, MVC. After you've done that for a while, go back and review those alternate architectures. I don't use them, but hey, maybe you'll find value.

"But what about package managers and build tools?!"

There's an argument you should immediately learn about Carthage and CocoaPods, 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.

Step 6 to ∞: Build More Apps

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.

Subscribe to Sandofsky

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe