Online Book Reader

Home Category

iPhone Game Development - Chris Craft [20]

By Root 1598 0
previously selected, you will need to click on the Build tab.

10. Select your Provisioning Profile under Code Signing⇒Code Signing Identity⇒Any iPhone OS Device (Figure 2.13).

Figure 2.13

Setting the Provisioning Profile here can be a stumbling block for new developers.

11. For the property Code Signing⇒Code Signing Entitlements, type Entitlements.plist (Figure 2.14).

12. Click OK and then click Build and Go, and you should see your application up and running on your iPhone or iPod touch.

Figure 2.14

Assigning the Entitlements.plist that you just created for your application

Programming: Hello World

Tradition dictates that the first program we explore creating should be the well-known Hello World application. At its simplest, Hello World is a computer program that simply displays the text “Hello World.” Considered a classic of computer science, Hello World is the first application many new developers write when learning a new programming language. There are a few reasons for this. Hello World is simple enough for beginning programmers to fully understand what the application will do. And since the application does just one simple thing, you only have to learn how to do that one thing to see results. A more advanced application would require you to have a more advanced understanding before you would be prepared to create it.

Defining your goals

One thing that really sets iPhone developers apart from other developers is the expectation placed on them to always raise the bar with everything they create. This is a part of the iPhone's fit and finish that Apple has been able to create. Everything has to both look great and work great. So why should it be any different when it comes to creating your first iPhone application, Hello World? An iPhone application is expected to stand out when judged against other non-iPhone applications. Today's iPhone owners want to be surprised and delighted by any and all iPhone applications they try. And you don't want to let them down!

Before you tackle how to create a Hello World application of your very own, review Apple's Hello World sample from the iPhone Dev Center at http://developerapplecom/HelloWorld _iPhone/index.html. Apple describes their Hello World as “Say hello with style. See how you can transform the mundane into the memorable with graphical flair.” As you can see in Figure 2.15, Apple has done a pretty good job of taking the mundane Hello World application and making it a first-class citizen that seems perfectly at home on the iPhone.

How did they do it? Some might say they did it with style. Every detail has to be just right, and nothing can be left to chance. Although the minimum requirement for a Hello World application is to simply display the text “Hello World,” this app goes so much further. Everything about the application looks and feels good, even the application icon. There are professionally published applications on many desktops right now that have only the same dull default icon.

We see planet Earth at the center of the screen, from a fascinating vantage point of someone perhaps standing on the moon. Functionality is not sacrificed for the sake of form, either, because not only does the application display “Hello, World!” but it takes any input the user provides and displays it as the output. It just happens to default to “Hello, World!” Once again, the app does more than the bare minimum required.

Tip

While the Hello World application may not appear to do much, it does accomplish one important task: You can use it to validate that the compiler, development environment, and run-time environment are all correctly installed and working as expected.

Examining your options

Take a step back and decide how you can raise the bar for your remake of the classic Hello World application. There are two areas to focus on: form and function. It's usually a good idea to think of a lot of ideas first, and then decide on the best ones to actually do.

FIGURE 2.15

iPhone SDK Hello World sample


Form and function are important with many things.

Return Main Page Previous Page Next Page

®Online Book Reader