When I first tried out my new iPhone, I was instantly curious about how everything worked on it. To satisfy my curiosity, I started learning iOS development. Do you want to become an iOS developer? Let me give you some tips I wish I knew when I first started!
What’s the deal with iOS development? Is it easy, hard or somewhere in between? I’ve been asked lots of times how I started with iOS development and what was the learning process of becoming an iOS app developer.
My answer has always been the same – it takes time, effort and patience to get over the learning curve. But first, you’ll need some advice about required tools and learning resources necessary to become a competent iOS developer.
This tutorial is a part of our ‘Becoming a developer’ series. You can check out our previous article on Becoming a Ruby on Rails developer.
Unfortunately, there is no way to develop iOS apps on Windows. You’ll need OS X for this, which means you’ll need to buy either an iMac, Mac mini or a MacBook. If you’re used to working on PCs, this might be a little bit pricey, but it’s totally worth it.
Also, you don’t have to go with a top model Mac. A machine with an Intel-based processor and the Snow Leopard version of Mac OS X will be good enough, as this is the minimal requirement for Apple’s IDE called Xcode. Newest version, Xcode 5 requires OS X 10.8 (Mountain Lion). Older Macs that don’t support Mountain Lion still support Xcode 4, but is best to have the most recent version of Xcode available. Currently, the least expensive Mac is a Mac Mini, starting at $599. Of course, you can also buy a used Mac cheaper.
But I don’t want to work on a Mac
You’re probably thinking, why can’t I install OS X on my PC (in a virtual machine or build a Hackintosh)? This could get you started, but there are a lot of problems that can occur and I would recommend against it. If you want to be a professional developer, the best way is to have appropriate hardware which you know is stable and will always run smoothly.
After you’ve grabbed your new, shiny Mac, the next step is to download Xcode. Xcode is the official IDE (Integrated Development Environment) for iOS, which contains a complete development environment, including:
- Interface builder
- Full documentation reference library
Best of all, Apple provides this SDK completely free and it’s available on the Mac App Store. Want to see how awesome Xcode is and what it contains? You can check that out here.
With Xcode installed, you’ll be able to write and compile iPhone apps. But there’s a trick. If you’re not enrolled in the iOS developer program, you’ll only be able to compile your apps for the simulator. This is great, but not enough if you want to test more complicated apps that use a camera, gyroscope or other things available only on a real iOS device.
iOS Developer Program
Once you’ve created your first iOS app, you’ll want to test it on an actual device or publish it to the App Store to reveal your masterpiece to the world (and maybe earn a few bucks in the process). That means enrolling in the iOS Developer Program (which costs $99). It also grants you access to a large number of useful developer resources in the iOS Dev Center, official Apple developer forums and beta iOS and Xcode versions.
iOS apps are written in the Objective-C programming language. Objective-C is an object-oriented programming language based on C. That means that Objective-C is a superset of C and it takes everything from C, but also adds some extra functionality to it, such as Smalltalk-style messaging.
Object oriented programming is a programming paradigm that allows you to divide your application code into objects that have data fields and methods. These objects then interact with each other to implement specific behavior. Object oriented programming makes it easier to develop structured and maintainable code.
Diving into Objective-C
If you start looking for a book to start with, you’ll find a lot of them. Read the reviews and choose one for yourself or, for starters, follow my suggestion – read Programming in Objective-C by Stephen Kochan.
You can also start with another great book by The Big Nerd Ranch called Objective-C Programming: The Big Nerd Ranch Guide.
After you have a basic understanding of Objective-C, it is time to use it in an iOS programming environment. While developing iOS apps, you will use Cocoa Touch, Apple’s UI (User Interface) framework that drives iOS apps. It’s a library with frameworks and APIs, containing everything from touchable buttons, custom maps, video and audio players to device notifications.
Creating your iOS app
There are two ways you can learn iOS app development: books or video tutorials. It’s best to use both.
Regarding books, a very fine choice is iOS Programming: The Big Nerd Ranch Guide 4th Edition. The latest edition contains all the important updates built into iOS 7 and Xcode 5.
When it comes to videos, the best choice are video tutorials from Stanford University. Lucky for you, Stanford’s lectures are available online for free. This course contains everything you need to learn the basics of iOS development, and, as you follow it, you’ll write your first very own application for iPhone.
After you are finished with these, you’ll feel completely confident to write you own apps.
Don’t forget about Apple’s official documentation!
Apple takes care of its developers, so it has created a fantastic online resource containing everything you’ll need if you get stuck with something while developing your app. It contains example code and tutorials so you can start with specific technologies and aspects of iOS apps.
Learn to use the official documentation right from the start. It’s a major plus if you master using it right at the beginning. It will make things easier for you in the future when you’ll work with new things that you haven’t encountered before.
The best way to extend your knowledge is to continue creating apps. You have an idea for an app, but you don’t know how to write it right from the start? That shouldn’t worry you; you’ll learn things along the way. There is a massive amount of resources on the Internet for iOS development and I’m sure you’ll find your way.
With every problem comes a solution, and with every solution your knowledge will grow and you’ll become more confident and a more competent iOS developer. If you persist with your project and complete the app, you’ll definitely learn a lot along the way. That means you will be ready for a new, more complicated project.