Becoming an iPhone Developer
Obviously there is more to being an iPhone developer than just sitting down and writing a program. You need a modern Intel Macintosh desktop or laptop running a recent version of Leopard or Snow Leopard, and at least 6GB of free space on your hard drive. The more screen space you have on your development system, the easier it will be to switch between the coding, design, simulation, and reference tools that you'll need to be using. That said, I've worked perfectly happily on a 13" MacBook Pro, so an ultra-HD multimonitor setup certainly isn't necessary.
So, assuming you already have a Mac, what else do you need? The good news is that there isn't much more, and it won't cost you a cent to write your first iPhone application.
Joining the Apple Developer Program
Despite somewhat confusing messages on the Apple website, there really is no fee associated with joining the Apple Developer Program, downloading the SDK (Software Development Kit), writing iPhone applications, and running them on Apple's iPhone Simulator.
There are limitations, however, to what you can do for free. If you want to have early access to beta versions of the iPhone OS and SDK, you'll need to be a paid member. If you want to load the applications you write on a physical iPhone device or distribute them on the App Store, you'll also need to pay the membership fee. Most of the applications in this book will work just fine on the simulator provided with the free tools, so the decision on how to proceed is up to you.
DID YOU KNOW?
If you aren't yet sure if the paid program is right for you, you can upgrade at any time. I recommend starting out with the free program and upgrading after you've had a chance to write a few sample applications and run them in the simulator.
Obviously, things such as vibration and sensor input can't be accurately presented in the simulator, but these are special cases and won't be needed until later in the book.
If you choose to pay, the paid Developer Program offers two levels: a standard program ($99) for those who will be creating applications that they want to distribute on the App Store, or an enterprise program ($299) for larger companies wanting to develop and distribute applications in-house but not through the App Store. Chances are, the standard program is what you want.
BY THE WAY: The standard ($99) program is available for both companies and individuals. If you want to publish to the App Store with a business name, you'll be given the option of choosing a standard "individual" or "company" program during the registration.
Registering as a Developer
Big or small, free or paid, your venture into iPhone development begins on Apple's website. To start, visit the Apple iPhone Dev Center (http://developer.apple.com/iphone/), shown in Figure 1.2.
If you already have an Apple ID from using iTunes or other Apple services, congratulations, you're almost done! Use the Log In link to access your account, agree to Apple's developer terms, and provide a few pieces of additional information for your developer profile. You'll immediately be granted access to the free iPhone developer resources!
FIGURE 1.2. Visit the iPhone Dev Center to log in or start the enrollment process.
If you don't yet have an Apple ID, click the Register link and choose Create an Apple ID in the first step, as shown in Figure 1.3.
The registration process walks you through the process of creating a new Apple ID, and collects information about your development interests and experience, as shown in Figure 1.4.
After the registration is complete, Apple will verify your email address by sending you a clickable link to activate your account.
Joining a Paid Developer Program
Once you have a registered and activated Apple ID, you can make the decision to join a paid program, or continue using the free resources. If you choose to join a paid program, again point your browser to the iPhone Dev Center (http://developer. apple.com/iphone) and click the Register button. Choose Use an Existing Apple ID for the Developer Program option, visible in Figure 1.3.
FIGURE 1.3. You'll use an Apple ID to access all the developer resources.
FIGURE 1.4 The multistep registration process collects a variety of information about your development experience.
The registration tool will now guide you through applying for the paid programs, including choosing between the standard and company options, as shown in Figure 1.5.
FIGURE 1.5. Choose the paid program that you want to apply for.
Unlike the free Developer Membership, the paid Developer Program does not take effect immediately. When the App Store first launched, it took months for new developers to join and be approved into the program. Today, it may take hours or a few days--just be patient. You can check your current status at any time by logging in to the iPhone Dev Center and following the Check Your Enrollment Status Now link.
Use the Register link to create a new free Developer Membership, or follow the links in the iPhone Developer Program section (currently http://developer.apple.com/iphone/program/) to join a paid program.
Installing the iPhone Developer Tools
After you've registered your Apple ID, you can immediately download the current release version of the iPhone developer tools directly from the iPhone Dev Center (http://developer.apple.com/iphone/). Just click the Download link and sit back while your Mac downloads the massive (~3GB) SDK disk image.
DID YOU KNOW?
If you have the free Developer Membership, you'll likely only see a single SDK to download--the current release version of the development tools. If you've become a paid program member, you may see additional links for different versions of the SDK (2.2, 3.0, and so on). The examples in this book are based on the 3.x series of SDKs, so be sure to choose that option if presented.
When the download completes, open the resulting disk image, and double click the iPhone SDK icon. This will launch the Mac OS X installer application and assist you in the installation. There is no need to change any of the defaults for the installer, so just read and agree to the software license and click Continue to proceed through the steps.
Unlike most applications, the Apple developer tools will be installed in a folder called Developer located at the root of your hard drive. Inside the Developer folder are dozens of files and folders containing developer framewords, source code files, examples, and of course, the developer applications themselves. Nearly all of your work in this book will start with the application Xcode, located in the Developer/Applications folder (see Figure 1.6).
FIGURE 1.6. Most of your work with the developer tools will start in the Developer/Applications folder.
Although we won't get into real development for a few more hours, we will be configuring a few options in Xcode in the next section, so don't forget where it is!
Next: Creating a Development Provisioning Profile
Reprinted with permission from Pearson Publishing. To purchase the book, click here.
About the Authors
John Ray is a senior business analyst and development team manager for the Ohio State University Research Foundation.
Sean Johnson, a long-time Mac developer with over 15 years of product development experience, currently writes a column on product design for the Mac Developer Network.