The Web Developer's Guide to Building iOS Apps With Swift

Ever since I bought my first Mac I would always open up Xcode periodically and see if I could figure out how to create a working Mac or iOS app. The Xcode IDE is such a complex piece of software and each time I tried I’d give up after an hour and resign myself to continue to focus on the web as my primary area of expertise. Now all that’s changing and I’m writing a book on iOS development using Swift for developers like me. It’s part of my “Developer’s Guide” series and I’ve already finished the first draft of chapter 1. What’s changed? Why am I doing this now? Do we even need to learn native coding now that Phonegap exists? Absolutely, and now is the perfect time.

Perfect timing

Apple hosted WWDC 14 (World Wide Developer Conference) this week and made some pretty exciting announcements. iOS 8 and OS X Yosemite are cool and so is the new Healthkit and home integration APIs but the thing I’m most excited about is the introduction of their new programming language for both OS X and iOS, Swift.

Because of this announcement, I think that right now is the perfect time to learn iOS programming. Of course, if you really want to develop for iOS devices any time is a good time but Swift makes things different in a number of ways. Putting aside the awesome new APIs developers will have access to in iOS 8, Swift is a clean slate for iPhone and iPad development. Because it’s a new language, everyone is starting from scratch and learning at the same time. There are only a handful of truly good, authoritative resources for learning Swift and we’re all starting from a level playing field. Okay, so it isn’t totally level considering that those who know Objective-C and their way around Xcode will not have that steep of a learning curve but for everyone else who has yet to learn Objective-C it’s great.

When iOS 8 is released this fall it will mark the beginning of the end of an era. From that point forward all Apple development (be it on iOS or OS X) will be geared toward Swift and if Apple’s past moves are anything to go by, I predict that Objective-C will begin to be phased out just like they phased out PowerPC Macs and Carbon when OS X 10.6 was released. Granted, backwards compatibility for these things exists to some degree or another and the phase out took a number of years but the transition was fast, relatively speaking. This means that everyone who learns Swift now will be ahead of the game years from now when Objective-C becomes obsolete (imagine having to port your app from Objective-C to Swift one day because suddenly you realize the deadline is a week away).

Why now?

I’ve been putting off learning Objective-C for years. The syntax looks weird and all the code that Xcode writes for me kind of scares me off (I don’t know what any of it does)! Rather than get my hands dirty with native app development, I got a taste of iOS programming from developing my first iOS (and Android) app, MoonWeather. It was a great experience and I learned a decent amount about Xcode, how the App Store works, and got a taste of some iOS APIs. MoonWeather turned out so well that for about a week after its launch I thought, “this works just fine, why would I need to go native”? Then it struck me. My users don’t notice but I do. There’s a teeny lag in some of my interactions with the app and trying to replicate native transitions, touch events, and other goodies that the iOS SDK gives you free using web technologies is a pain. Although it would be a pain to learn Objective-C or Swift, both of those options are better in the long term.

Do we even need to go native?

I’m going to continue development on MoonWeather as I have until iOS 8 comes out then switch it over to a pure Swift app. Why? Because if you’re using Phonegap then you’re at the mercy of Adobe. If they don’t update their software to work with the latest iOS SDK then you’re screwed.

I’ve come to the conclusion that yes, we absolutely must go native. I think solutions like Phonegap are great for prototyping an idea and getting it to market quickly but if you’re serious about the business of the App Store like I am then you’ll want to go native.

Announcing “The Web Developer’s Guide to Building iOS Apps with Swift”

I saw the opportunities presented by Swift and after having experienced the shortcomings of the web-to-native style of creating mobile apps, I decided that now is the perfect time to get into native iOS development, specifically, using Swift. Starting today, I’ll be porting MoonWeather to Swift and developing a brand new app – for iPhone, an app that I’ve long promised to my users but have yet to deliver.

I’ll be documenting my journey from web developer to native iOS developer here on the blog and as part of a new book I’m writing in my “Web Developer’s Guide to X” series. I hope to teach you, through my own experience as a developer totally new to native iOS coding, how to become a native iOS developer. Developing for mobile is a totally different world compared to web development and my hope is to guide readers through the journey step-by-step. I’ll be including all the minor details and explaining concepts to you as if you were a five-year-old where appropriate and picking up the pace and leaving out the obvious stuff where that makes sense too. There needs to be a happy balance between the fine details and general overviews. As a developer, you already understand programming concepts like classes, functions, and all that fun stuff but do you know how all that stuff works together on iOS or what a UITableViewController is and how to get one? That’s the stuff this book will cover. It’ll baby you where you need it and be hands-off where you don’t. Of course, there will be plenty of pictures, diagrams, and code samples along the way.

The book will take you through the process of developing an iOS app in Swift from beginning to end in a structured way. And because it’s being written by a fellow web developer, it’ll cover all the questions that would naturally come up when switching from web to mobile. Oh, and you’ll also get access to the entire codebase of the app being written in the book along with updates to it. The book will be available in PDF, Mobi, and ePub formats (and probably an HTML version too).

Sign up using the form on this page and I’ll send you free chapters as they’re written (hopefully you’ll send me feedback in return), a monthly newsletter containing helpful resources and tutorials for anyone learning iOS development, and a hefty discount when the book is released.

Please sign up in the sidebar now. It’ll help me get a gauge of who’s interested and what they may need. I never spam. You can email me back with your own ideas too (bill -AT-

(Here’s a sneak peak at my very first Swift app running in the iOS 8 simulator – pretty advanced, huh? The book will take you from what you see below to full blown iOS developer in a matter of days).

My first Swift app

Developer's Guide, iOS development

« Hits 4k Users All my menu bar/Finder icons have disappeared. What gives? »