Chapter 3. Enlisting in the Developer Corps

In This Chapter

  • Registering as a developer

  • Exploring the iPhone Dev Center

  • Installing the Software Development Kit (SDK)

  • Looking at the whys and hows of joining the Developer Program

Benjamin Franklin's famous Join, or Die political cartoon of the 1760s could well be applied to Apple's role in today's mobile software industry. You can't gain independence on your own; you need the powerful movement of a large group. Apple needs developers, and developers need Apple.

For sure, you can develop your applications independently, and for other platforms (which is the topic of other books), but many of those platforms offer immature Software Development Kits and little or no support. What's more, you could develop for a number of platforms and then watch your product die in a diffused marketplace.

Apple is clearly on a mission with the iPhone and the App Store ecosystem to change the user experience, and you have to join (or die). No, you won't automatically turn into an Apple fanboy (but it doesn't hurt to be one, either). You will be supported with a robust Software Development Kit, comprehensive information, and reliable support.

Most importantly, you must join if you want to develop apps for the iPhone. You have to follow Apple's policies and procedures. Although the iPhone Software Development Kit (SDK) is free, you have to register as an iPhone developer first. Registering also gives you access to all the documentation and other resources found on the iPhone Developer Web site. This whole ritual transforms you into a Registered iPhone Developer.

Becoming a registered developer is free, as well as the SDK, but there's a catch: If you actually want to run your application on a real iPhone as opposed to only on the Simulator that comes with the SDK, you have to join the iPhone developer program. Fortunately, an individual membership costs only $99 as of this writing. This is called Joining the iPhone Developer Program. (I should mention as well that an individual membership is required of anyone who wants to distribute his or her app using the App Store.)

In this chapter, you go through the process of becoming a registered iPhone developer, signing on to and then exploring the iPhone Dev Center Web site, downloading the SDK so you can start using it, and then (finally) joining the iPhone Developer Program.

Note

What you see when you go through this process yourself may be slightly different from what you see here. Don't panic. It's because Apple changes the site from time to time.

Becoming a Registered iPhone Developer

Although just having to register is annoying to some people, it doesn't help that the process itself can be a bit confusing. Fear not! Follow the steps, and you can safely reach the end of the road. (If you've already registered, skip to the next section, where you find out what the iPhone Dev Center offers and how to download the SDK.)

  1. Point your browser to http://developer.apple.com/iphone.

    Doing so brings you to a page similar to the one shown in Figure 3-1. Apple does change this site occasionally, so when you get there, it may be a little different. You may be tempted by some of the links, but they get you only so far until you log in as a registered developer.

  2. Click the Register link in the top-right corner of the screen. (Refer to Figure 3-1.)

    You see a page explaining why you should become a registered iPhone developer.

  3. Click Continue.

    A page appears, asking whether you want to create a new Apple ID or use an existing one.

    Tip

    You can use your current Apple ID (the same one you use for iTunes, MobileMe, or the Apple Store) or create a new Apple ID and then log in.

    • If you don't have an Apple ID, select Create an Apple ID and click Continue. You find yourself at the page shown in Figure 3-2.

    • If you already have an Apple ID, select the Use an Existing Apple ID option and then click Continue. You're taken to a screen where you can log in with your Apple ID and password. That takes you to the page shown in Figure 3-2, with some of your information already filled out.

  4. Continue filling out the personal profile form and then click Continue.

    If you have an Apple ID, most of the form is already filled out.

    The iPhone Dev Center.

    Figure 3-1. The iPhone Dev Center.

    Tip

    You must fill in the country code in the phone number field. If you're living in the United States, the country code is 1.

  5. Complete the next part of the form to finish your professional profile.

    You're asked some basic business questions. After you've filled everything in and clicked the Continue button, you're taken to a new page, which asks you to agree to the Registered iPhone Developer Agreement.

  6. Click I Agree.

    Tip

    Don't forget to select the confirmation check box that you have read and agree to be bound by the agreement and that you're of legal age.

    If you just created your Apple ID, you're asked for the verification code sent to the e-mail address you supplied when you created your Apple ID. If you used your existing Apple ID, you'll be taken to Step 8.

  7. Open the e-mail from Apple, enter the verification code, and click Continue.

    Clicking Continue takes you to a thank-you page.

  8. On the thank-you page, click the Visit Phone Development Center button, and you're automatically logged in to the iPhone Dev center, which I describe in the section "Exploring the iPhone Dev Center" in this chapter.

Creating an Apple ID and personal profile.

Figure 3-2. Creating an Apple ID and personal profile.

So, you're now an officially registered iPhone developer, which enables you to explore the iPhone Dev Center and download the SDK (as I show in the section "Exploring the iPhone Dev Center" in this chapter — and you can jump to that section if you're not ready to join the iPhone Developer Program).

However, simply registering as a developer doesn't give you the status you need to actually run your app on your own (or anyone else's) iPhone or to distribute your app through the App Store. The next section shows you how to get with the program — the iPhone Developer Program.

Joining the iPhone Developer Program

The Simulator application for the Mac that comes standard with the iPhone SDK is a great tool for learning to program, but it does have some limitations. It doesn't support some hardware-dependent features, and when it comes to testing, it can't really emulate such everyday iPhone realities as CPU speed or memory throughput.

"Minor annoyances," you might say, and you might be right. But the real issue is that just registering as a developer doesn't get you two very important things: the ability to actually run your app on your own iPhone, and the ability to distribute your app through the App Store. (Remember that the App Store is the only way for commercial developers to distribute their apps — even free apps — to more than a few people.)

To run your app on a real iPhone or get a chance to profile your app in the App Store, you have to enroll in either the Standard or Enterprise version of the iPhone Developer Program.

Tip

It used to be that that the approval process could take a while, and although the process does seem quicker these days, it's still true that you can't run your apps on your iPhone until you're approved. You should enroll as early as possible.

If you go back to the iPhone Dev Center page, you see a section in the right column that says iPhone Developer Program. (Refer to Figure 3-1.) Here's how you deal with that section:

  1. Click the Learn More link next to the question "Not a Program Member?" (Refer to Figure 3-1.)

    The iPhone Developer Program page appears, as shown in Figure 3-3.

    The iPhone Developer Program overview.

    Figure 3-3. The iPhone Developer Program overview.

  2. On the right side of the screen, click the Enroll Now button.

    A new page appears, telling you to choose your program and outlining the details of each developer program, as shown in Figure 3-4.

    Note

    The Standard program costs $99. The Enterprise program costs $299 and is designed for companies developing proprietary in-house apps for iPhone and iPod touch. To be sure you're selecting the option that meets your needs, give the program details a once-over.

    You can check out program details.

    Figure 3-4. You can check out program details.

  3. Click the Enroll Now button.

    You don't actually get to choose Standard or Enterprise yet. But you do get an overview of the process and a chance to log in again with your Apple ID and password. Click Continue.

  4. Do the logging-in stuff.

    After logging in, you get a chance to go with either a Standard Individual, Standard Company, or Enterprise program. Figure 3-5 shows you the differences between the three options.

  5. Make your choice and then click Select.

    This step takes you to a page that gives you more information on the option you've selected.

  6. Click Continue.

    Depending on the option you selected, you're either given the opportunity to pay (if you selected Standard Individual) or you're asked for some more company or enterprise information and then given the ability to pay.

    Choose your program.

    Figure 3-5. Choose your program.

    Although joining as an individual is easier than joining as a company, there are clearly some advantages to enrolling as a company. For example, you can add team members (which I discuss in connection with the developer portal in Chapter 6 of this minibook), and your company name appears in your listing in the App Store.

    Warning

    When you join as an individual, your real name shows up when the user buys (or downloads for free) your app in the App Store. If you're concerned about privacy, or if you want to seem "bigger," the extra work invoked in signing up as a company may be worthwhile for you.

  7. Continue through the process, and eventually you will be accepted in the Developer Program of your choice.

After acceptance, you can log in to the iPhone Dev Center as an Official iPhone Developer and see the page shown in Figure 3-6.

If you click the iPhone Developer Program Portal link in the right column, you see all sorts of things you can do as a developer, as shown in Figure 3-7.

Tip

You shouldn't linger too long at the iPhone Developer Program Portal page, simply because it can be really confusing unless you understand the process. I explain this portal — which lets you provision your device, run your application on it, and prepare your creation for distribution to the App Store — in Chapter 6 of this minibook.

The iPhone Dev Center with resources and downloads.

Figure 3-6. The iPhone Dev Center with resources and downloads.

The iPhone Developer Program Portal.

Figure 3-7. The iPhone Developer Program Portal.

Exploring the iPhone Dev Center

You can find more of the resources available to you in the iPhone Dev Center later in the section "Resources in the iPhone Dev Center," but for the moment, I want you to focus on what you're really after. I'm talking about the iPhone SDK.

The SDK offers tools for developing your iPhone app. Here's a handy list of what's inside:

  • Xcode: This refers to Apple's complete development environment, which integrates all the SDK's features: the code editor, the build system, the graphical debugger, and project management. (I introduce you to the code editor's features in more detail in Chapter 4 of this minibook.)

  • Frameworks: The iPhone's multiple frameworks help make it easy to develop apps. Creating an app can be thought of as simply adding your application-specific behavior to a framework. The framework does all the rest. For example, the UIKit framework provides fundamental code for building your app: the required application behavior, classes for windows, views (including those that display text and Web content), controls, and view controllers. (I cover all these things in Chapter 5 of this minibook.) The UIKit framework also provides standard interfaces to core location data, the user's contacts and photo library, accelerometer data, and the iPhone's built-in camera.

  • Interface Builder: You find out about Interface Builder in Chapter 4 of this minibook, and use it to build the user interface for the DeepThoughts application in Book III. But Interface Builder is more than your run-of-the-mill program that builds graphical user interfaces. In Chapter 2 of Book III, you see how Xcode and Interface Builder work together to give you ways to build (and automatically create at runtime) the user interface — as well as helping to create objects that provide the infrastructure for your application.

  • iPhone Simulator: The simulator enables you to debug your app and do some other testing on your Mac by simulating the iPhone. The Simulator runs most iPhone apps, but it doesn't support some hardware-dependent features. I give you a rundown on the Simulator in Chapter 4 of this minibook.

  • Instruments: The Instruments application lets you measure your iPhone app while it's running on an iPhone. It gives you a number of performance metrics, including those for testing memory and network use. It also works (in a limited way) on the iPhone Simulator, and you can test some aspects of your design there.

Note

The iPhone Simulator doesn't emulate such real-life iPhone characteristics as CPU speed or memory throughput. If you want to understand how your app performs on the iPhone from a user's perspective, you have to use the actual iPhone and the Instruments application.

Looking forward to using the SDK

The tools in the SDK support a development process that most people find comfortable. They allow you to rapidly get a user interface up and running to see what it actually looks like. You can add code a little at a time and then run it after each new addition to see how it works. I take you through this incremental process as you develop the DeepThoughts app; for now, here's a bird's-eye view of iPhone app development, one step at a time:

  1. Start with Xcode.

    Xcode provides several project templates that you can use to get off to a fast start. (In Chapter 4 of this minibook, you do just that, and then you add code and more interface objects in Book III.)

  2. Design and create the user interface.

    Interface Builder has graphic-design tools you can use to create your app's user interface. This saves a great deal of time and effort. It also reduces the amount of code you have to write by creating resource files that your app can then upload automatically.

    Note

    If you don't want to use Interface Builder, you can always build your user interface from scratch, creating each individual piece and linking them all together within your app. Sometimes Interface Builder is the best way to create onscreen elements; sometimes the hands-on approach works better.

  3. Write the code.

    The Xcode editor provides several features that help you write code. You can find out more about these features in Chapter 3 of Book III.

  4. Build and run your app.

    You build your app on your computer and run it in the iPhone Simulator application or (provided you've joined the Development Program) on your iPhone.

  5. Test your app.

    You'll want to test the functionality of your app as well as response time.

  6. Measure and tune your app's performance.

    After you have a running app, make sure that it makes optimal use of resources such as memory and CPU cycles.

  7. Do it all again until you're done.

Resources in the iPhone Dev Center

You're not left on your own when it comes to the Seven-Step Plan for Creating Great iPhone Apps in the previous section. After all, you have this book to help you on the way — as well as a heap of information squirreled away in various corners of the iPhone Dev Center (refer to Figure 3-6). I've found the following resources to be especially helpful:

  • Getting Started Videos: These are relatively light on content.

  • Getting Started Documents: Think of them as an introduction to the materials in the iPhone Reference Library. These give you an overview of iPhone development and best practices. Included is "Learning Objective-C: A Primer," an overview of Objective-C that also includes links to "Object-Oriented Programming with Objective-C" and "The Objective-C 2.0 Programming Language" (the definitive guide).

    Tip

    If you have some experience with Objective-C or object-oriented programming, you're ready for Book II. If you've never programmed in the Objective-C language, you should check out the basic information in the iPhone Reference Library. If you want to get a handle on Objective-C as quickly (and painlessly) as possible, go get yourself a copy of Objective-C For Dummies by co-author Neal. (Neal does a great job explaining everything you need to know in order to program in Objective-C, and he assumes you have little or no knowledge of programming.)

  • The iPhone Reference Library: This library includes all the documentation you could ever want (except, of course, the answer to that one question you really need answered at 3 a.m., but that's the way it goes). To be honest, most of this stuff only turns out to be really useful after you have a good handle on what you're doing. As you go through this book, however, an easier way to access some of this documentation will be through the Xcode Documentation window, described in Chapter 3 of Book III.

  • Coding How-To's: These tend to be a lot more valuable when you already have something of a knowledge base.

  • Sample Code: On the one hand, sample code of any kind is always valuable. Most good developers look over sample apps before they get started building their own. They'll take something that closely approximates what they want to do, and they modify it until it does exactly what they want it to do. When I started iPhone development, there were no books like this one; so much of what I learned came from looking at the samples and then making some changes to see how things worked. On the other hand, perusing the sample apps can give you hours of (misguided) pleasure and can be quite the time waster and task avoider.

  • Apple Developer Forums Beta: I'm not the first to say that developer forums can be very helpful, and I'm also not the first to admit that they're a great way to procrastinate. As you scroll through the questions people have, be careful about some of the answers you see. No one is validating the information people are giving out. But take heart: Pretty soon you'll be able to answer some of those questions better yourself.

Downloading the SDK

Enough prep work. Time to do some downloading.

As of this writing, Apple offers version 3.1.2 of the SDK and a prerelease beta version 3.2 (which includes iPad development tools). You can use version 3.1.2, which is stable, to develop applications for iPhone and iPod touch, which run on iPhone OS 3.1.2 as of this writing. You can switch at any point to the beta or released 3.2 version to develop iPhone and iPod touch apps for iPhone OS 3.2 (when it becomes widely available), and for the new iPad, which runs iPhone OS 3.2.

Version 3.1.2 requires an Intel-based Mac running Mac OS X 10.5 (Leopard) or Mac OS X 10.6.2 (Snow Leopard) or a newer version. Version 3.2 beta requires an Intel-based Mac running Mac OS X Snow Leopard version 10.6.2 or a newer version.

Warning

By the time you read this book, it may no longer be version 3.2. You should download the latest SDK. That way you will get the most recent version to start with.

To install version 3.1.2 of the SDK, scroll to the bottom part of the iPhone Dev Center page, as shown in Figure 3-8.

Download the iPhone SDK version 3.1.2.

Figure 3-8. Download the iPhone SDK version 3.1.2.

Tip

Underneath the download link there is another link to a Read Me file (iPhone SDK 3.1.2 with Xcode 3.2.1 Read Me). It is a PDF, "About Xcode and the iPhone SDK," that tells you everything you need to know (and more) about this version of the SDK. Peruse it at your leisure, but don't get too hung up on it if there are things you have no clue about. You can find details in Chapter 4 of this minibook.

After perusing "About Xcode and the iPhone SDK," click the iPhone SDK you want to download.

To install version 3.2 of the SDK, click the iPhone SDK 3.2 beta link above the left column of the iPhone Dev Center page (refer to Figure 3-6), which displays the iPhone Dev Center page for version 3.2. Scroll this page, as shown in Figure 3-9, to see the links for downloading the SDK. Underneath the download link there is another link to a Read Me file (Xcode 3.2.2 Read Me). Click this link to read "About Xcode and the iPhone SDK," which describes what Xcode can do (most of which I explain in Chapter 4 of this minibook). After perusing "About Xcode and the iPhone SDK," click the iPhone SDK 3.2 beta with Xcode 3.2.2 (Snow Leopard) link (refer to Figure 3-9) to download it.

Download the iPhone SDK version 3.2 beta.

Figure 3-9. Download the iPhone SDK version 3.2 beta.

You can watch the download in Safari's download window (which is only a little better than watching paint dry).

When it's done downloading, the iPhone SDK window appears onscreen, complete with an installer and various packages tied to the install process. All you then have to do is double-click the iPhone SDK installer and follow the (really simple) installation instructions. After you do all that, you have your very own iPhone Software Development Kit on your hard drive.

Getting Yourself Ready for the SDK

Don't despair. The preceding process was tedious, but as the song goes, "It's all over now." Going through the process of registering and joining the program is probably the second most annoying part of your journey toward developing software for the iPhone. The most annoying part is figuring out what Apple calls "provisioning" your iPhone — the hoops you have to jump through to actually run your app on a real, tangible, existing iPhone. You go through the provisioning process in Chapter 6 of this minibook, and frankly, getting that process explained is worth the price of this book.

In the next chapter, you get started using the SDK you just downloaded, and you become intimately acquainted with the iPhone SDK during the course of your project. I assume that you have some programming knowledge and that you also have some acquaintance with object-oriented programming, with some variant of C, such as C++, C#, and maybe even with Objective-C. If those assumptions miss the mark, help us out, okay? Take another look at the "Resources in the iPhone Dev Center" section, earlier in this chapter, for an overview of some of the resources that can help you get up to speed on some programming basics. Or, better yet, get yourself a copy of Objective-C For Dummies.

I also assume that you're familiar with the iPhone itself, and that you've explored at least Apple's preinstalled apps to become familiar with the iPhone's look and feel.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.182.50