Chapter 3. Creating a Test Workbench
It’s convenient to test code snippets initially in an environment that is isolated from your major work in progress. First, you don’t want other code to influence your experiment (think “scientific method”). Second, you don’t want your experiments to mess up your existing working code. The Workbench app you will build in this chapter will provide you with a running iPhone environment (initially on the iPhone Simulator) in which you can easily test expressions, logic, and the like. Use it as a learning lab while you work through the remaining chapters of this book.
Figure 3-1 shows the finished app. True, it’s nothing more than an iPhone screen with a button on it. You will set up this app so that you can test your code in the iPhone OS runtime environment by clicking that button. Results will appear in a separate window of Xcode, called the Console (more about that later). The ...