Chapter 2. Building your first app

 

This chapter covers

  • Launching Xcode for the first time
  • Creating your first application
  • Running your first application

You’ve done all the setup (if you haven’t done it yet, please go to appendix A to set up the tools you’ll need to complete this chapter). Now you’re probably eager to start creating your first app. We’re going to start off as almost every programmer ever has: with a Hello World application—a rite of passage for coding. A Hello World application is the first app almost every programmer writes when learning a new programming language, because it’s a simple app that accomplishes two goals:

  • It gets the programmer using the new tools.
  • It proves that the programming tools are set up correctly.

Those are the goals of the application, but what does it actually do? Hello World will launch and display the words “Hello World!” That’s it. It may not seem like much, but it’s important to take small steps while learning to program.

I’m going to write my own version of pseudocode here so you know what you want to accomplish. As I explained in chapter 1, pseudocode is your road map—logical steps required to make the app do what you want it to do. This pseudocode will be a bit more detailed than future chapters, because it’s your first app. In my version of the pseudocode, the steps needed to build the Hello World app are as follows:

2.1. Launching Xcode for the first time

2.2. Summary