Chapter 2

The Xcode Programming Environment

What You Will Learn In This Chapter:

  • Using Xcode to write and debug programs
  • Navigating your project's code and assets by using the Navigation area and the Jump bars
  • Creating and editing code effectively by using the Editor area
  • Debugging your code by using breakpoints
  • Stepping through your code and inspecting variable values
  • Building a simple user interface by using Interface Builder

Once you have the idea for your game planned out and you are ready to start writing code, you need to think about how you are going to get your code into the computer. You could use a simple text editor like emacs, vi, TextEdit, or BB Edit to write your code because code files are just basic ASCII text files. However, there is a better way, the Xcode Integrated Development Environment or IDE.

You may be familiar with using an IDE on other platforms. For example, Visual Studio is the most prevalent IDE for building software based on the .Net platform on Windows. Eclipse is an open source IDE that you can use to develop software in many languages including Java. Xcode is the IDE for building software for the Mac and iOS platform.

Aside from the capabilities of an advanced text editor, a good IDE provides you with additional tools that help you with the software development process. The typical tools include file management, integration with the code compiler, UI design functionality, and debugging features. In this chapter, you will see how Xcode incorporates ...

Get Beginning iOS Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.