iPhone Game Development - Chris Craft [15]
3. In the Xcode Project Window, choose Groups & Files⇒Targets and click your project target. Next, click the Info icon on the toolbar.
4. Once inside the Info window, click the Build pane. Make sure that, in the settings list, Code Signing⇒Code Signing Identity is expanded, and then click on the Any iPhone OS Device popup menu in the Value column. Choose the iPhone Development Provisioning Profile and Certificate pair that you created earlier (Figure 1.19).
Figure 1.18
Changing the Active SDK setting to build for a physical device.
Figure 1.19
Configuring the Code Signing Identity of your application
5. Click on the Properties pane of the Info window. From there, input the Bundle Identifier you defined when you created your App ID. In our example we entered 1234567890.com.yourdomain* as an example. For this example you will want to enter com.yourdomain.HelloWorld as the identifier leaving off the Bundle Seed ID portion and replacing the wildcard asterisk character with your application name (Figure 1.20).
If you did not use a wildcard, you will need to use the full Bundle Identifier and only leave off the Bundle Seed ID. In our previous example we used the App ID 1234567890.com.yourdomain.YourAppName. In this case you would want to input com.yourdomain.YourAppName.
Figure 1.20
Setting the target Identifier with the Bundle Identifier from your App ID
Build and test your application on your development device
After completing all of the previous steps, you are ready to build and test on your iPhone or iPod touch. At this point all you need to do is plug in your device and click Build and Go. You should see your application load up and start running after a few seconds (Figure 1.21). In this environment you can run and debug just as you would have in the Simulator. Breakpoints, watches, and console output work the same way.
FIGURE 1.21
Follow the steps in this chapter, and you'll soon see your first application running on your iPhone or iPod touch.
Summary
In this chapter you learned a little about the history of mobile devices. It has been a long road with successes and failures that have paved the way to where we are today. Most notable is that Apple started this journey with the Apple Newton, which ended in failure. However, despite setbacks, Apple has kept the vision alive, setting the bar with the iPhone. As a result, you can enjoy the benefits of developing games for this beautifully designed device.
Next, you took a first look at the iPhone SDK and what it has to offer. You gained an understanding of what steps you will need to take to get started as an iPhone developer, including how deep you will need to dip into your pocket for cash. You took a tour of the iPhone SDK and the iPhone Developer Program, and you learned about all the tools from the iPhone SDK you can expect to leverage as a developer. You also got a peek at the resources and benefits offered to you as a member of the iPhone Developer Program.
Finally, you learned how to utilize your new set of tools and deploy applications to your iPhone and iPod touch for testing. You walked through all of these steps in detail, since this is one of the more difficult tasks and causes developers to stumble when they are getting started. You will find this walk-through most beneficial, especially if you are new to the Mac world, as many iPhone developers are. This guide will help you find your way through a process that can feel alien to first-time visitors.
Chapter 2: Creating Your First App: Hello World
In This Chapter
Setting up your environment
Test-driving the SDK
Programming: Hello World
Now that you have had an introduction to the iPhone SDK, it's time to get your hands dirty. In the grand programming tradition, we are going to assist you through writing the Hello World application for the iPhone. If you follow the steps in this chapter,