We're ready to get started writing some Objective-C. Objective-C is just plain text, so we could write it using a simple text editor or even using the terminal. But we're not going to because I don't want to put myself or you through that much pain and inconvenience. Instead, we're going to use Xcode which is free and, if you haven't installed it already, now's a good time to go and get it from the Mac App Store. And yes, in case you're wondering you are going to need a Mac. The development tools are not cross platform. It is technically possible to write Objective C in Linux or Windows but I'm assuming that you're watching this course because you want to build apps for iOS devices or for the Mac and you will need a Mac to do that.
And you should be running a recent Mac operating system, 10.9 Mavericks or Mountain Lions OS 10.8. While you can install Xcode on earlier versions, being on the latest operating system is always highly recommended if you're developing for an Apple platform. So Xcode is an IDE, an integrated development environment like Visual Studio or Eclipse or NetBeans. And, being in ID just means it does more than one thing. It's not just a code editor. Sure, we do write our code in Xcode, but we also organize our projects in Xcode.
We compile our programs here. We design user interfaces here. We use it to debug and to analyze performance. We can use it to write unit tests and work with source control and lots of other things. And in some other languages it's common to shop around and try a bunch of different editors or different IDE's before figuring out which one personally suits you best. But not here. If you're learning Objective-C You need Xcode, and in this course we're using Xcode 5. Now it is a large download. It's about two gigabytes.
And it's so big because really you aren't just downloading Xcode here. You're downloading a whole suite of applications, documentation, debugger tools, simulators, code libraries. Everything you need for writing iOS and Mac applications. But once it's installed you will find it in your Applications folder in the normal location. And the first time you open Xcode you're likely to get a message to install some necessary components. You will need to go ahead and do that. However before we go any further with Xcode we should also pay a visit to the Apple Developer website at developer.apple.com.
There's a lot of great resources here and it has two main areas there's the IOS dev center for iPhone and iPad resources and the Mac dev center for those of you working on Mac desktop and laptop app development. This is also the place that you can get information about joining either of Apple's developer programs. The main ones are the iOS developer program and or the Mac developer program. In the US these are currently $99 a year each, 60 pounds in the UK, similar amounts in other countries. Now the biggest reason you would want to join either of these programs, is that when you make an app and you're ready to put it on the iOS or Mac app store.
You will need to be a member of that respective program to do that. However, you can complete this course without joining either program. Although you should register as an Apple developer if you haven't already done that. Either from the iOS dev center or the Mac dev center, it doesn't matter which. You will find just a simple link to register. And this is free, so if you haven’t done that, now is the time. And one of the reasons we do this is to get full access to the documentation and technical resources found on Apple’s developer’s site which we can then actually access within Xcode as we’ll see a little later.
- Installing the tools
- Understanding the structure of an Objective-C program
- Logging messages and using format strings
- Writing conditional code
- Using code snippets
- Working with variables, classes, and functions
- Working with objects
- Using existing classes in the Foundation framework
- Managing memory usage
- Creating custom classes
- Working with Objective-C collections
- Reading and writing to files
- Understanding inheritance and NSObject
- Using Categories, Protocols, and Class Extensions
- Compiling and debugging code